865 lines
29 KiB
HTML
Executable File
865 lines
29 KiB
HTML
Executable File
<! This document generated using mif2html Version 1.0 - Walt Akers - 1996 !>
|
|
<head>
|
|
<title>CDEV Documentation</title>
|
|
</head>
|
|
|
|
<body bgcolor="#E0E0FF">
|
|
|
|
<body>
|
|
<! ************************ FILE : cdevGatewayTITLE.mif *****************************!>
|
|
<br><hr><br>
|
|
<table width=100%>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start ADDRESS-TITLE ***!><font size=+12 color=Black><strong><em>
|
|
CDEV Gateway
|
|
<!*** Finish ADDRESS-TITLE ***!></p></strong></em></font>
|
|
<!*** Start ADDRESS-VERSION ***!><font size=+1 color=Black>
|
|
|
|
</p>
|
|
A Message Router/Concentrator for CDEV Clients
|
|
</p>
|
|
|
|
</p>
|
|
Walt Akers, Chip Watson, Jie Chen
|
|
</p>
|
|
|
|
</p>
|
|
Version 1.0 - February 13, 1997
|
|
</p>
|
|
|
|
</p>
|
|
TJNAF - Thomas Jefferson National Accelerator Facility
|
|
</p>
|
|
|
|
<!*** Finish ADDRESS-VERSION ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
<! *************************** TABLE OF CONTENTS ****************************!>
|
|
<br><hr><br>
|
|
<table width=100%>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top align=center>
|
|
<!*** Start CLASS-TOC-TITLE ***!><font size=+3><strong>
|
|
Table of Contents
|
|
<!*** Finish CLASS-TOC-TITLE ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
1.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF1">CDEV Gateway Fundamentals</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF2">Overview of the CDEV Gateway</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF3">Purpose of the CDEV Gateway</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF4">Features of the CDEV Gateway Service</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
2.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF5">Building the CDEV Gateway Service</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF6">Location of Files</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF7">Steps to Building the Server and Service</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
3.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF8">Starting the CDEV Gateway</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF9">Starting the Gateway Server</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF10">Start-up Arguments for the Gateway Server</a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
4.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF11">Troubleshooting Server Start-up</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
5.
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF12">DDL Entries for the CDEV Gateway Client</a>
|
|
<!*** Finish HEADING1TOC ***!><br></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start UHEADING2TOC ***!><font size=+1 color=Black>
|
|
<a href="cdevGateway.html#TOCREF13">Setting Up the DDL </a>
|
|
<!*** Finish UHEADING2TOC ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
</table>
|
|
<! **************************** LIST OF FIGURES *****************************!>
|
|
<br><hr><br>
|
|
<table width=100%>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top align=center>
|
|
<!*** Start CLASS-LOF-TITLE ***!><font size=+3><strong>
|
|
List of Figures
|
|
<!*** Finish CLASS-LOF-TITLE ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
|
Figure 1:
|
|
<a href="cdevGateway.html#LOFREF1">Simple DDL file for the Gateway Service</a>
|
|
<!*** Finish FIGURELOF ***!><br></font>
|
|
</td></tr>
|
|
</table>
|
|
<! ************************ FILE : ./cdevGateway.mif *****************************!>
|
|
<br><hr><br>
|
|
<table width=100%>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
1.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF1">
|
|
CDEV Gateway Fundamentals
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF2">
|
|
Overview of the
|
|
CDEV Gateway
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The CDEV Gateway is a server that acts as an intermediary between a CDEV
|
|
application and remote services. A single network connection is established between
|
|
the client and the gateway through which all CDEV requests will be routed. When the
|
|
gateway receives a request from the client, it establishes the appropriate connection
|
|
to the actual service, makes the request, and returns the result to the client
|
|
application.
|
|
<!*** Finish BODY ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF3">
|
|
Purpose of the
|
|
CDEV Gateway
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The CDEV Gateway was designed to support the JAVA/CDEV API. Because JAVA
|
|
code must be small in order to load and execute efficiently, it was critical to move as
|
|
much code as possible out of JAVA and into a CDEV "proxy" which could perform
|
|
connection management and dynamic library loading. This allows the JAVA
|
|
application to access new services provided in C++ without adding any new code.
|
|
</p>
|
|
The JAVA/CDEV library locates the CDEV Gateway by using a hostname and port that
|
|
is provided in an environment variable. After determining the location of the server,
|
|
JAVA will establish a connection to the gateway and then begin transmitting its CDEV
|
|
requests in standard CLIP (CDEV Linear Internet Protocol).
|
|
</p>
|
|
The gateway can also be used by standard C or C++ CDEV applications to perform
|
|
message routing. This approach can lessen the number of connections to actual
|
|
control system devices and reduce network traffic significantly. The gateway is located
|
|
by the gateway service by looking up its name (as specified in the CDEV DDL) in the
|
|
global name server (The current name server is distributed as part of the CDEV
|
|
Generic Server in the CDEV distribution).
|
|
<!*** Finish BODY ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF4">
|
|
Features of the
|
|
CDEV Gateway
|
|
Service
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The CDEV Gateway is constructed using the CDEV Generic Server Engine and
|
|
the CLIP Protocol.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
Each gateway server registers its name, host and port with the CDEV Name
|
|
Server when it is started.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The name of the specific gateway to be used is associated with a CDEV device/
|
|
message combination by using the "server" field of the service data in the CDEV
|
|
DDL file. Syntax is described later in this document.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The gateway service will establish one connection to a named gateway to perform
|
|
all transactions.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The client application uses a special DDL file that redirects all signals to the
|
|
gateway service. This allows the gateway server to maintain the actual control
|
|
system connections from a centralized location.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
<img src="bullet.jpg">
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BULLETED ***!><font size=+1 color=Black>
|
|
The gateway server may have a standard DDL that redirects requests to the
|
|
actual service OR it may have a special DDL that routes requests to another
|
|
gateway. The system has currently been tested by routing messages through as
|
|
many as ten gateways before reaching the actual control system. Note that
|
|
performance begins to degrade substantially after routing through five gateways -
|
|
but is still reasonable.
|
|
<!*** Finish BULLETED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
2.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF5">
|
|
Building the CDEV Gateway Service
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF6">
|
|
Location of Files
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The source code for the Gateway Service is provided with the CDEV distribution
|
|
starting with version 1.5. The source code is located in the directory $CDEV/
|
|
applications/cdevGateway. The following steps should be taken to build the Gateway
|
|
Server and Service.
|
|
<!*** Finish BODY ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF7">
|
|
Steps to Building
|
|
the Server and
|
|
Service
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
1.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
Obtain and install the CDEV distribution - Version 1.5 or higher.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
2.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
Follow the installation steps to build CDEV on your system. This includes setting
|
|
all of the environment variables required by CDEV.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
3.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
Follow the installation steps to build the CDEV Generic Server and deploy the
|
|
CDEV Name Server.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
4.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
There is a collection of platform specific makefiles in the directory <em>$CDEV/
|
|
extensions/cdevGenericServer/include/makeinclude</em>. Link the makefile that is
|
|
appropriate to your architecture to the file Makefile.OS in THAT directory.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
<!*** Start INDENTED ***!><font size=+1 color=Black>
|
|
For example, to link to the makefile for HP-UX, you would type the following
|
|
command.
|
|
</p>
|
|
|
|
</p>
|
|
<em>cd $CDEV/extensions/cdevGenericServer/makeinclude</em>
|
|
</p>
|
|
<em>ln -s Makefile.hpux Makefile.OS</em>
|
|
</p>
|
|
|
|
<!*** Finish INDENTED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
5.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
Change directories to <em>$CDEV/applications/cdevGateway</em>.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
6.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
Type make to compile and link the CDEV Gateway Service shared object and the
|
|
CDEV Gateway Server. Note that you must be using GNU make in order to build
|
|
this distribution.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
Upon completion the Makefile will generate the shared object for the gateway service
|
|
and will install it into your CDEVSHOBJ directory. The gateway server will be
|
|
compiled, linked and installed in the directory $CDEV/applications/cdevGateway/bin/
|
|
ARCH/cdevGateway. At this point you are ready to start the gateway server.
|
|
<!*** Finish BODY ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
3.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF8">
|
|
Starting the CDEV Gateway
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF9">
|
|
Starting the
|
|
Gateway Server
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The following steps should be taken to execute the cdevGateway.
|
|
<!*** Finish BODY ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED1 ***!><font size=+1 color=Black>
|
|
1.
|
|
<!*** Finish NUMBERED1 ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED1 ***!><font size=+1 color=Black>
|
|
Ensure that the required CDEV and CDEV Generic Server environment variables
|
|
have been set. These include:
|
|
<!*** Finish NUMBERED1 ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME_2 ***!><font size=+1 color=Black><strong>
|
|
CDEVDDL
|
|
<!*** Finish FUNC_NAME_2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF_2 ***!><font size=+1 color=Black>
|
|
This is the name of the DDL file that indicates where
|
|
messages should be routed. Typically, this DDL will
|
|
route the messages to the actual control system
|
|
devices.
|
|
<!*** Finish FUNC_DEF_2 ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME_2 ***!><font size=+1 color=Black><strong>
|
|
CDEVSHOBJ
|
|
<!*** Finish FUNC_NAME_2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF_2 ***!><font size=+1 color=Black>
|
|
This is the location of the CDEV shared object files.
|
|
<!*** Finish FUNC_DEF_2 ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME_2 ***!><font size=+1 color=Black><strong>
|
|
CDEV_NAME_SERVER
|
|
<!*** Finish FUNC_NAME_2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF_2 ***!><font size=+1 color=Black>
|
|
This is the host where the CDEV Name Server is
|
|
running.
|
|
<!*** Finish FUNC_DEF_2 ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
2.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
Move to the directory where the CDEV Gateway Server binary is located: by
|
|
default $CDEV/applications/cdevGateway/bin/ARCH, where ARCH is the name of
|
|
the host architecture.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
3.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start NUMBERED ***!><font size=+1 color=Black>
|
|
Type the command ./cdevGateway at the command line. This will start a gateway
|
|
server with the name <strong><em>Gateway1</strong></em><em> </em>on the current host using TCP/IP port 9573. This
|
|
information can be confirmed by using the <strong><em>dumpServer</strong></em> command that is
|
|
provided with the CDEV Generic Server Engine to display the contents of the
|
|
CDEV Name Server.
|
|
<!*** Finish NUMBERED ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
At this point the cdevGateway should be ready for use by client applications.
|
|
<!*** Finish BODY ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF10">
|
|
Start-up
|
|
Arguments for the
|
|
Gateway Server
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The user can specify the name of port used by the CDEV Gateway from the command
|
|
line when the server is started. The gateway server will accept the following
|
|
parameters from start-up.
|
|
<!*** Finish BODY ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME_2 ***!><font size=+1 color=Black><strong>
|
|
s=<em>server name</em>
|
|
<!*** Finish FUNC_NAME_2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF_2 ***!><font size=+1 color=Black>
|
|
This allows the caller to specify the server name that
|
|
will be registered with the name server. By default
|
|
the server name is <strong><em>Gateway1</strong></em>.
|
|
<!*** Finish FUNC_DEF_2 ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME_2 ***!><font size=+1 color=Black><strong>
|
|
p=<em>port number</em>
|
|
<!*** Finish FUNC_NAME_2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF_2 ***!><font size=+1 color=Black>
|
|
This allows the caller to specify the port that the
|
|
server will use to receive incoming requests. By
|
|
default the port used by the server is <strong><em>9573</strong></em>.
|
|
<!*** Finish FUNC_DEF_2 ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
4.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF11">
|
|
Troubleshooting Server Start-up
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
When the server is started it may display one or more error conditions that will prevent
|
|
it from operating properly.
|
|
<!*** Finish BODY ***!></p></font>
|
|
<table>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Error:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
syntax error at line:#
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Meaning:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This message indicates that the CDEVDDL file that is being
|
|
used by the gateway is formatted improperly.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Solution:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
Edit the CDEVDDL file and correct any formatting errors that
|
|
may exist.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Error:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
ERROR: Gateway1 server already exists in GATEWAY domain
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Meaning:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This message indicates that a gateway server with the name
|
|
Gateway1 has already been started and is currently registered
|
|
with the CDEV Name Server.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Solution:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
The gateway will continue to attempt to register itself with the
|
|
name server every 30 seconds. If the message continues to
|
|
appear, then restart the gateway using the s parameter to
|
|
specify a different server name OR shutdown the other
|
|
gateway that is using the same name.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Error:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
Could not communicate with name server
|
|
</p>
|
|
ERROR: Failed to execute "REGISTER SERVER" operation
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Meaning:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This message indicates that the CDEV Name Server could not
|
|
be accessed either because it is not running or because the
|
|
CDEV_NAME_SERVER environment variable does not specify
|
|
the correct host.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Solution:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
Ensure that the CDEV_NAME_SERVER environment variable
|
|
is set and indicates the host where the name server is running.
|
|
If this is correct, check to ensure that the name server is
|
|
actually running on the specified host.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Error:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
|
Error: Server Gateway1 - Unable to open listening socket
|
|
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Meaning:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
This message indicates that the port that the name server is
|
|
attempting to use to listen for new connections is already in
|
|
use.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
|
Solution:
|
|
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start FUNC_DEF ***!><font size=+1 color=Black>
|
|
Use the command line arguments to specify a different listening
|
|
port.
|
|
<!*** Finish FUNC_DEF ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
</td></tr>
|
|
<tr><td valign=top align=right>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
5.
|
|
<!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start HEADING1 ***!><font size=+3 color=Black><strong>
|
|
<a name="TOCREF12">
|
|
DDL Entries for the CDEV Gateway Client
|
|
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
|
</td></tr>
|
|
<tr><td valign=top>
|
|
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
|
<a name="TOCREF13">
|
|
Setting Up the
|
|
DDL
|
|
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
The following example illustrates how to add a service entry to identify the CDEV
|
|
Gateway Service and how to use the service data to specify the server that the
|
|
gateway service will use for routing messages.
|
|
</p>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
|
Figure 1:
|
|
<a name="LOFREF1">
|
|
Simple DDL file for the Gateway Service
|
|
<table border=1><tr><td>
|
|
<table>
|
|
<tr><td>
|
|
<! ***** Empty Column ***** !>
|
|
</td>
|
|
<td valign=top>
|
|
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
|
/*
|
|
* This is the service definition, it tells CDEV that there is
|
|
* a service named Gateway and that it will use the cdevData
|
|
* tag 'server' to locate the gateway using the CDEV Name Server.
|
|
*/
|
|
service Gateway
|
|
{
|
|
tags {server}
|
|
}
|
|
|
|
/*
|
|
* This class definition identifies the class gatewayClass which
|
|
* supports the "get","set", "monitorOn" and "monitorOff"
|
|
* commands on attributes "attrib0" and "attrib1". Note that
|
|
* requests made to attrib0 will be routed through "Gateway1"
|
|
* and requests made to attrib1 will be routed through
|
|
* "Gateway2".
|
|
*/
|
|
class gatewayClass
|
|
{
|
|
verbs {get, set, monitorOn, monitorOff}
|
|
attributes
|
|
{
|
|
attrib0 Gateway {server=Gateway1};
|
|
attrib1 Gateway {server=Gateway2};
|
|
}
|
|
}
|
|
|
|
/*
|
|
* Finally, the CDEV DDL identifies two devices that are of type
|
|
* gatewayClass. Any time one of the supported messages is passed
|
|
* to one of these devices it will be routed through a CDEV
|
|
* Gateway.
|
|
*/
|
|
gatewayClass : device0, device1;
|
|
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
|
</td></tr>
|
|
</table>
|
|
</tr></td></table>
|
|
<AFrame 1>
|
|
</a> <!*** Finish FIGURE ***!></p></em></font>
|
|
<!*** Start BODY ***!><font size=+1 color=Black>
|
|
|
|
<!*** Finish BODY ***!></p></font>
|
|
</td></tr>
|
|
</table>
|
|
</body>
|