cdev-1.7.2n
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
#!/bin/csh
|
||||
#
|
||||
# File: $CDEV/.setup
|
||||
#
|
||||
# EPICS users, see lines below containing EPICS
|
||||
#
|
||||
if ( $?CDEV == 0 ) then
|
||||
setenv CDEVVERSION 1.7.2
|
||||
|
||||
echo "Setting up CDEV Version $CDEVVERSION"
|
||||
|
||||
# to use EPICS, define EPICSLIB or uncomment these lines:
|
||||
# if ( $?EPICSLIB == 0 ) then
|
||||
# setup epics
|
||||
# endif
|
||||
|
||||
setenv OS `uname -s`
|
||||
setenv REVISION `uname -r`
|
||||
|
||||
switch ($OS)
|
||||
case HP-UX:
|
||||
setenv LIBDIR `echo $REVISION | awk '{ FS="."; printf("hpux-%s.%s", $2, $3); exit; }'`
|
||||
breaksw
|
||||
|
||||
case SunOS:
|
||||
setenv OS_MAJOR_REV `echo $REVISION | awk '{FS="."; print $1; exit; }'`
|
||||
if ($OS_MAJOR_REV < 4) then
|
||||
setenv LIBDIR sunos
|
||||
else
|
||||
setenv LIBDIR solaris
|
||||
endif
|
||||
breaksw
|
||||
|
||||
case Linux:
|
||||
setenv LIBDIR Linux
|
||||
breaksw
|
||||
|
||||
case AIX:
|
||||
setenv LIBDIR `echo uname -v | awk '{FS="."; printf("aix-%s.%s", $REVISION, $1); exit; }'`
|
||||
breaksw
|
||||
|
||||
default:
|
||||
setenv LIBDIR $OS
|
||||
breaksw
|
||||
|
||||
endsw
|
||||
|
||||
|
||||
setenv CDEV `pwd`
|
||||
setenv CDEVLIB $CDEV/lib/$LIBDIR
|
||||
setenv CDEVSHOBJ $CDEVLIB
|
||||
setenv CDEVBIN $CDEV/bin/$LIBDIR
|
||||
setenv CDEVINCLUDE $CDEV/include
|
||||
setenv CDEVDDL $CDEV/ddl/master.bdd
|
||||
setenv CDEV_ACCOUNT_FILE $CDEV/ddl/cdevAccount.txt
|
||||
|
||||
setenv PATH ${PATH}:${CDEVBIN}
|
||||
|
||||
# to use EPICS, uncomment these 2 lines and comment out next 2
|
||||
setenv EPICS /devl/epics
|
||||
setenv EPICSLIB /devl/epics/base/lib/Linux
|
||||
setenv SHLIB_PATH ${CDEVSHOBJ}:${CDEVLIB}:${EPICSLIB}
|
||||
setenv LD_LIBRARY_PATH ${CDEVSHOBJ}:${CDEVLIB}:${EPICSLIB}
|
||||
# setenv SHLIB_PATH ${CDEVSHOBJ}:${CDEVLIB}
|
||||
# setenv LD_LIBRARY_PATH ${CDEVSHOBJ}:${CDEVLIB}
|
||||
|
||||
unsetenv LIBDIR
|
||||
unsetenv OS_MAJOR_REV
|
||||
unsetenv OS
|
||||
unsetenv REVISION
|
||||
|
||||
#---- Automatic way to recreate the important symbolik links---------------
|
||||
|
||||
set R=`cat /etc/redhat-release | awk 'BEGIN{FS=" "};{print $5}'`
|
||||
set MAKEFILE1="Makefile.linux-redhat$R-x86"
|
||||
set DIR1="include/makeinclude/"
|
||||
set DIR2="extensions/cdevGenericServer/include/makeinclude/"
|
||||
|
||||
if ( -e $DIR1$MAKEFILE1 ) then
|
||||
echo "Creating the Symbolic link ${DIR1}Makefile.linux -> $MAKEFILE1"
|
||||
rm -f ${DIR1}Makefile.linux
|
||||
ln -s $MAKEFILE1 ${DIR1}Makefile.linux
|
||||
else
|
||||
echo "file $MAKEFILE1 does not exist in $DIR1"
|
||||
endif
|
||||
|
||||
if ( -e $DIR2$MAKEFILE1 ) then
|
||||
echo "Creating the Symbolic link ${DIR2}Makefile.linux -> $MAKEFILE1"
|
||||
rm -f ${DIR2}Makefile.linux
|
||||
ln -s $MAKEFILE1 ${DIR2}Makefile.linux
|
||||
else
|
||||
echo "file $MAKEFILE1 does not exist in $DIR2"
|
||||
endif
|
||||
#-----------------------------------------------------------------------------
|
||||
endif
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
BASEDIR = $(MAKEDIR)
|
||||
DIRS = $(BASEDIR)\src \
|
||||
$(BASEDIR)\extensions\cdevGenericServer \
|
||||
$(BASEDIR)\applications\cdevGateway
|
||||
BINDIRS = $(BASEDIR)\lib\WINNT-4.0-DEBUG \
|
||||
$(BASEDIR)\lib\WINNT-4.0 \
|
||||
$(BASEDIR)\bin\WINNT-4.0-DEBUG \
|
||||
$(BASEDIR)\bin\WINNT-4.0 \
|
||||
$(BASEDIR)\extensions\cdevGenericServer\lib\WINNT-4.0-DEBUG \
|
||||
$(BASEDIR)\extensions\cdevGenericServer\lib\WINNT-4.0 \
|
||||
$(BASEDIR)\extensions\cdevGenericServer\bin\WINNT-4.0-DEBUG \
|
||||
$(BASEDIR)\extensions\cdevGenericServer\bin\WINNT-4.0 \
|
||||
$(BASEDIR)\applications\cdevGateway\bin\WINNT-4.0-DEBUG \
|
||||
$(BASEDIR)\applications\cdevGateway\bin\WINNT-4.0
|
||||
|
||||
notarget : all
|
||||
|
||||
all clean :
|
||||
@for %d in ($(DIRS)) do @if exist %d cd %d & $(MAKE) /NOLOGO $@ /f NMakefile.mak
|
||||
|
||||
purge :
|
||||
@for %d in ($(DIRS)) do @if exist %d cd %d & $(MAKE) /NOLOGO $@ /f NMakefile.mak
|
||||
@for %d in ($(BINDIRS)) do @if exist %d rmdir /s /q %d
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (c) 1995,1996 Southeastern Universities Research Association
|
||||
Continuous Electron Beam Accelerator Facility
|
||||
Thomas Jefferson National Accelerator Facility
|
||||
12000 Jefferson Avenue, Newport News, VA 23606
|
||||
|
||||
This material resulted from work developed under a United States Government
|
||||
Contract and is subject to the following license:
|
||||
|
||||
The Government retains a paid-up, nonexclusive, irrevocable worldwide license
|
||||
to reproduce, prepare derivative works, perform publicly and display publicly
|
||||
by or for the Government including the right to distribute to other Government
|
||||
contractors.
|
||||
|
||||
|
||||
DISCLAIMER AND LIMITATION OF WARRANTY.
|
||||
|
||||
ALL SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY. THERE
|
||||
ARE NO WARRANTIES EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED
|
||||
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THERE IS NO WARRANTY THAT USE WILL NOT INFRINGE
|
||||
ANY PATENT, COPYRIGHT OR TRADEMARK.
|
||||
|
||||
In consideration of the use of the software and other materials, user agrees
|
||||
that neither the Government nor SURA/TJNAF will be liable for any damages with
|
||||
respect to such use, and user shall hold both the Government and SURA/TJNAF
|
||||
harmless from and indemnify them against any and all liability for damages
|
||||
arising out of the use of such software and other materials. In no event shall
|
||||
the Government or SURA/TJNAF be liable whether arising under contract, tort,
|
||||
strict liability or otherwise for any incidental, indirect or consequential
|
||||
loss or damage of any nature arising at any time from any cause whatsoever. In
|
||||
addition, the Government and SURA/TJNAF assume no obligation for defending
|
||||
against third party claims or threats of claims arising as a result of user's
|
||||
use of the software or materials either as delivered to user or as modified by
|
||||
user.
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
#! /bin/csh -f
|
||||
|
||||
echo "--------------------------------------------------------------------------"
|
||||
echo "NewDist: Building compressed file for CDEV Distribution"
|
||||
echo " Prior to running this program, make sure that all changes "
|
||||
echo " that are to be distributed with this release have been checked"
|
||||
echo " into CVS."
|
||||
echo " "
|
||||
echo " Last used successfully by Walt Akers on 07/24/99"
|
||||
echo "--------------------------------------------------------------------------"
|
||||
|
||||
if ($#argv < 2) then
|
||||
echo "Format is: NewDist MajorVer MinorVer <Release>"
|
||||
echo " ... MajorVer is the major version number of cdev"
|
||||
echo " ... MinorVer is the minor version number of cdev"
|
||||
echo " ... Release is the release number of cdev\n"
|
||||
echo "Example: To create a distribution for cdev/1.6.2 the"
|
||||
echo " command will be NewDist 1 6 2\n"
|
||||
exit
|
||||
else
|
||||
set MAJORVER=$1
|
||||
set MINORVER=$2
|
||||
if($#argv >2) then
|
||||
set RELEASE=$3
|
||||
set CVSTAG=CDEV_R${MAJORVER}_${MINORVER}_${RELEASE}
|
||||
set DISTDIR=cdev_${MAJORVER}.${MINORVER}.${RELEASE}
|
||||
else
|
||||
set RELEASE=None
|
||||
set CVSTAG=CDEV_R${MAJORVER}_${MINORVER}
|
||||
set DISTDIR=cdev_${MAJORVER}.${MINORVER}
|
||||
endif
|
||||
endif
|
||||
|
||||
echo "Steps: This program will perform the following steps"
|
||||
echo " to create the distribution.\n"
|
||||
echo " 1) It will install a revision number in cdev"
|
||||
echo " that identifies this version using the "
|
||||
echo " MajorVer/MinorVer/Revision number provided.\n"
|
||||
echo " (cdev/1.6.2 would be labeled cdev_R1_6_2.\n"
|
||||
echo " 2) cvs export will be executed to create a"
|
||||
echo " clean copy of the distribution in a new"
|
||||
echo " directory.\n"
|
||||
echo " (cdev/1.6.2 would be installed in cdev_1.6.2)\n"
|
||||
echo " 3) tar will be used to create an archive of the"
|
||||
echo " cdev distribution.\n"
|
||||
echo " (cdev/1.6.2 would be archived to cdev_1.6.2.tar)\n"
|
||||
echo " 4) gzip will be used to make a compress the archive\n"
|
||||
echo " (cdev/1.6.2 would be compressed to cdev_1.6.2.tar.gz\n"
|
||||
echo " 5) compress will be used to compress the archive using"
|
||||
echo " an alternate format.\n"
|
||||
echo " (cdev/1.6.2 would be compressed to cdev_1.6.2.tar.Z)\n"
|
||||
echo " 6) The temporary directory will be deleted.\n"
|
||||
echo "------------------------------- OPTIONS --------------------------------\n"
|
||||
echo "Major Version : $MAJORVER "
|
||||
echo "Minor Version : $MINORVER "
|
||||
echo "Release : $RELEASE "
|
||||
echo "CVS Release Tag : $CVSTAG "
|
||||
echo "Distribution Name : $DISTDIR \n"
|
||||
echo "------------------------------------------------------------------------\n"
|
||||
|
||||
echo "Press <CTRL>+C to quit or <RETURN> to continue"
|
||||
read
|
||||
echo "Continuing...\n"
|
||||
echo "STEP 1: Tagging CDEV with Revision Tag $CVSTAG"
|
||||
cvs rtag -afRF $CVSTAG cdev
|
||||
|
||||
echo "STEP 2: Exporting CDEV to temporary directory $DISTDIR"
|
||||
cvs export -r $CVSTAG -d $DISTDIR cdev
|
||||
|
||||
echo "STEP 3: Creating archive ${DISTDIR}.tar from $DISTDIR"
|
||||
tar -cvhf ${DISTDIR}.tar $DISTDIR
|
||||
cp ${DISTDIR}.tar ${DISTDIR}.tar.saf
|
||||
|
||||
echo "STEP 4: Compressing ${DISTDIR}.tar using gzip"
|
||||
gzip ${DISTDIR}.tar
|
||||
|
||||
echo "STEP 5: Compressing ${DISTDIR}.tag using compress"
|
||||
mv ${DISTDIR}.tar.saf ${DISTDIR}.tar
|
||||
compress ${DISTDIR}.tar
|
||||
|
||||
echo "STEP 6: Deleting temporary directory"
|
||||
rm -rf ${DISTDIR}
|
||||
@@ -0,0 +1,51 @@
|
||||
#! /bin/csh -f
|
||||
|
||||
echo "--------------------------------------------------------------------------"
|
||||
echo "NewTag: Updates the CVS tag for all files in the CDEV distribution"
|
||||
echo " Prior to running this program, make sure that all changes "
|
||||
echo " that are to be distributed with this release have been checked"
|
||||
echo " into CVS."
|
||||
echo " "
|
||||
echo " Last used successfully by Walt Akers on 09/13/99"
|
||||
echo "--------------------------------------------------------------------------"
|
||||
|
||||
if ($#argv < 2) then
|
||||
echo "Format is: NewTag MajorVer MinorVer <Release>"
|
||||
echo " ... MajorVer is the major version number of cdev"
|
||||
echo " ... MinorVer is the minor version number of cdev"
|
||||
echo " ... Release is the release number of cdev\n"
|
||||
echo "Example: To update the CVS tag for cdev/1.7.1 the"
|
||||
echo " command will be NewTag 1 7 1\n"
|
||||
exit
|
||||
else
|
||||
set MAJORVER=$1
|
||||
set MINORVER=$2
|
||||
if($#argv >2) then
|
||||
set RELEASE=$3
|
||||
set CVSTAG=CDEV_R${MAJORVER}_${MINORVER}_${RELEASE}
|
||||
set DISTDIR=cdev_${MAJORVER}.${MINORVER}.${RELEASE}
|
||||
else
|
||||
set RELEASE=None
|
||||
set CVSTAG=CDEV_R${MAJORVER}_${MINORVER}
|
||||
set DISTDIR=cdev_${MAJORVER}.${MINORVER}
|
||||
endif
|
||||
endif
|
||||
|
||||
echo "Steps: This program will perform the following steps"
|
||||
echo " to create the distribution.\n"
|
||||
echo " 1) It will install a revision number in cdev"
|
||||
echo " that identifies this version using the "
|
||||
echo " MajorVer/MinorVer/Revision number provided.\n"
|
||||
echo " (cdev/1.6.2 would be labeled cdev_R1_6_2.\n"
|
||||
echo "------------------------------- OPTIONS --------------------------------\n"
|
||||
echo "Major Version : $MAJORVER "
|
||||
echo "Minor Version : $MINORVER "
|
||||
echo "Release : $RELEASE "
|
||||
echo "CVS Release Tag : $CVSTAG "
|
||||
echo "------------------------------------------------------------------------\n"
|
||||
|
||||
echo "Press <CTRL>+C to quit or <RETURN> to continue"
|
||||
read
|
||||
echo "Continuing...\n"
|
||||
echo "STEP 1: Tagging CDEV with Revision Tag $CVSTAG"
|
||||
cvs rtag -afRF $CVSTAG cdev
|
||||
@@ -0,0 +1,25 @@
|
||||
This document describes how to port CDEV to a different UNIX platform.
|
||||
Currently, CDEV with channel access service has been tested on HP-UX 9.x,
|
||||
HP-UX 10.1(2), Solaris 2.5(6), and Linux 2.0.x, and CDEV without channel
|
||||
access service has been ported to SunOs (gcc-2.7), Ultrix (gcc-2.6), Irix,
|
||||
VMS (DEC C++) and AIX. The following are brief description of what one may
|
||||
have to do to port CDEV.
|
||||
1) Makefile and Makefile.common have to be changed a little (Check README).
|
||||
We are in the process to find a way to configure makefiles for different
|
||||
platform.
|
||||
|
||||
2)in src/cdevIO, xdrClass.h may need to add some header file for rpc related
|
||||
stuff.
|
||||
|
||||
3)in src/cdevIO. cdevData.i contains inlined functions for cdevData. If one
|
||||
has trouble to build library using inline function, add _CDEV_NO_INLINE
|
||||
to one's C++ flag.
|
||||
|
||||
4)one can build CDEV in a share library form and dynammically load services
|
||||
if the operating system permits. Currently one can have CDEV shared library
|
||||
on HP-UX, SunOs, Solaris, Linux, Irix. If shared libray of CDEV is desired
|
||||
form on a different platform, src/common/shObjLoader, that loads services
|
||||
into applications dynamically, has to be modified.
|
||||
|
||||
Eventually, all system dependent stuff will be in one file somewhere. But
|
||||
for now we don't have time to do that.
|
||||
@@ -0,0 +1,306 @@
|
||||
-----------------------------------------------------------------------------
|
||||
Copyright (c) 1995 Southeastern Universities Research Association,
|
||||
Continuous Electron Beam Accelerator Facility
|
||||
|
||||
This software was developed under a United States Government license
|
||||
described in the NOTICE file included as part of this distribution.
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
PACKAGE NAME: cdev
|
||||
|
||||
PURPOSE: To provide a simplified and extensible object oriented
|
||||
interface to the services provided by any control system
|
||||
or other message based system.
|
||||
|
||||
VERSION: 1.7.2
|
||||
|
||||
DESCRIPTION:
|
||||
The cdev (common device) C++ library is designed to provide a
|
||||
standard application programming interface (API) to one or
|
||||
more underlying packages, typically control system interfaces.
|
||||
The implementation is in 2 layers: the uppermost layer is used
|
||||
directly by an application, and provides an abstraction of the
|
||||
underlying package as well as many general purpose features.
|
||||
The second layer (service layer) provides the interface to one
|
||||
or more underlying packages, and is implemented as loadable
|
||||
libraries.
|
||||
|
||||
cdev was initially developed at Jefferson Lab in collaboration
|
||||
with the EPICS community, and is now available to anyone to take.
|
||||
It has been interfaced to a variety of accelerator control systems,
|
||||
including EPICS, systems at SLAC, CERN, Brookhaven and others.
|
||||
|
||||
We welcome all comments, suggestions, bug reports, and (especially)
|
||||
bug fixes. There are many planned enhancements, and we welcome
|
||||
volunteers to contribute to this project. See the release notes
|
||||
for a summary of planned features.
|
||||
|
||||
|
||||
DIRECTORIES:
|
||||
|
||||
./src * cdev source parent directory,
|
||||
* contains makefiles and subdirectories
|
||||
* with the source code necessary to
|
||||
* create the cdev libraries
|
||||
|
||||
./src/ca (only used by EPICS)
|
||||
./src/cdevIO
|
||||
./src/common
|
||||
./src/callback
|
||||
./src/device
|
||||
./src/directory
|
||||
./src/group
|
||||
./src/lib
|
||||
./src/namesvc
|
||||
./src/system
|
||||
./src/utility
|
||||
|
||||
./extensions
|
||||
* cdev network extensions to allow quick
|
||||
* and easy development of cdev servers
|
||||
./extensions/cdevGenericServers
|
||||
./extensions/SimpleService
|
||||
|
||||
./include * header files for cdev applications,
|
||||
* this directory will be populated
|
||||
* during the first execution of make
|
||||
|
||||
./lib * cdev library parent directory, this
|
||||
* directory will be populated with
|
||||
* subdirectories that contain target
|
||||
* specific libraries and object files
|
||||
|
||||
./lib/hpux-09.XX
|
||||
./lib/hpux-10.XX
|
||||
./lib/solaris
|
||||
./lib/Linux
|
||||
...
|
||||
|
||||
./bin * cdev binary parent directory, this
|
||||
* directory will be populated with
|
||||
* subdirectories that contain target
|
||||
* specific sample applications created
|
||||
* with the cdev libraries
|
||||
|
||||
./bin/hpux-09.XX
|
||||
./bin/hpux-10.XX
|
||||
./bin/solaris
|
||||
./bin/Linux
|
||||
...
|
||||
|
||||
./applications
|
||||
* ./applications/cdevGateway.
|
||||
A simple cdevGateway using cdevGenericServer library.
|
||||
|
||||
./doc * directory containing the most up-to-date
|
||||
* cdev documentation.
|
||||
|
||||
BUILDING CDEV: After installing the cdev package from the distribution
|
||||
media to the target directory, the user should be aware
|
||||
of the following considerations prior to starting a build.
|
||||
|
||||
Configure cdevDirectory and static services:
|
||||
|
||||
This must be done before any installation procedures.
|
||||
|
||||
cdev supports dynamically linked services as well as
|
||||
statically linked (archive library) services. In each
|
||||
case, services are accessible by name. For statically
|
||||
linked services, cdevDirectory must be configured to
|
||||
reference all needed services so that they are linked
|
||||
in at load time.
|
||||
|
||||
Additionally, cdevDirectory supports a default service
|
||||
which is used if no entry in a ddl file (or other
|
||||
user supplied directory service) for that operation.
|
||||
cdev is shipped with code to default to the EPICS
|
||||
channel access library. This default is enabled by
|
||||
defining the flag _HAS_CA.
|
||||
|
||||
There is a script (configSvc) in the src directory to assist
|
||||
in generating the proper code for the default service and
|
||||
statically linked services.
|
||||
|
||||
Example:
|
||||
You wish to use the EPICS channel access (ca) service and a
|
||||
service with name xyz, and want to enable defaulting to ca:
|
||||
|
||||
configSvc services=ca xyz \
|
||||
headers=/usr/local/epics/base/include \
|
||||
/usr/local/cdev/src/ca /usr/local/cdev/src/xyz \
|
||||
flags=_HAS_CA
|
||||
|
||||
The headers are the include directories needed for these
|
||||
services. The services are the names of the services. The
|
||||
configSvc will generate Makefile and cdevSvcConfig.cc in
|
||||
src/directory directory.
|
||||
|
||||
MAKE VARIABLES:
|
||||
|
||||
The cdev makefiles require several environment variables
|
||||
to be specified in order to compile correctly. These
|
||||
variables may either be entered explicitly on the make
|
||||
command line or may be specified in the local environment.
|
||||
|
||||
The following variables should be specified...
|
||||
|
||||
MAKE This variable specifies the make command
|
||||
that will be used in the makefiles of the
|
||||
subdirectories. Always use gnu make.
|
||||
|
||||
CDEV top directory of cdev.
|
||||
|
||||
CDEVSHOBJ directory in which shared libraries for services
|
||||
are installed.
|
||||
|
||||
EPICS This variable contains the EPICS root directory.
|
||||
This variable is undefined by default, and must
|
||||
be specified by the user if one wants to build
|
||||
channel access service.
|
||||
|
||||
EPICSLIB This variable contains the EPICS library path.
|
||||
It is used when one wants to build channel access
|
||||
service.
|
||||
|
||||
COMPILING THE DISTRIBUTION:
|
||||
|
||||
In order to compile this distribution you must perform the
|
||||
following steps.
|
||||
|
||||
1) Determine the required values of the makefile variables
|
||||
listed that will be necessary to compile cdev for your
|
||||
system.
|
||||
|
||||
|
||||
2) Go to $CDEV/include/makeinclude directory. Make a link
|
||||
to a right makefile. For example, on a Sun running solaris,
|
||||
do ln -s Makefile.solaris Makefile.OS
|
||||
|
||||
3) Change directories to the cdev distribution src directory.
|
||||
This is where the Makefile and Makefile.config will be
|
||||
located.
|
||||
|
||||
4) If you have compiled the cdev distribution for and other
|
||||
TARGET in the past, you should execute a 'make clean' to
|
||||
remove any outdated object files.
|
||||
|
||||
5) If you want to change default timeout value and connection
|
||||
retry frequency in channel access of EPICS, you should change
|
||||
DEFAULT_TIMEOUT and DEFAULT_CONN_FREQUENCY values in the
|
||||
caRequestObject.h right now.
|
||||
|
||||
6) Run configSvc in the src directory. This will generate Makefile
|
||||
and cdevSvcConfig.cc in src/directory.
|
||||
|
||||
7) Type make, the output will tell you the following:
|
||||
Type one of the following:
|
||||
make hpux for HP systems
|
||||
make hpux-sl for HP systems building shared library
|
||||
make hpux-cl for HP systems with CenterLine
|
||||
make hpux-cl-sl for HP systems with CenterLine Building shared library
|
||||
make irix5 for SGI running irix5
|
||||
make irix5-sl for SGI running irix5 building shared library
|
||||
make sunos4-gcc for SunOs 4.x and gcc
|
||||
make sunos4-gcc-sl for SunOs 4.x and gcc building shared library
|
||||
make solaris for Solaris2.x
|
||||
make solaris-sl for Solaris2.x and building shared library
|
||||
make solaris-gcc for Solaris2.x and gcc
|
||||
make solaris-gcc-sl for Solaris2.x and gcc building shared library
|
||||
make ultrix-gcc for ultrix 4.x and gcc
|
||||
make aix for IBM AIX 4.x
|
||||
make linux-sl for linux shared library
|
||||
make linux for linux archived library
|
||||
make clean
|
||||
Pick one from the above to build src distribution. If there is no
|
||||
one from the above list to match your platform, you can take a look
|
||||
at the Makefile.config to create one. Please send e-mail to us
|
||||
at cdev@jlab.org about your new makefile.
|
||||
|
||||
8) The libcdev.so or libcdev.a will be installed in $CDEV/lib/$(ARCH).
|
||||
and all services (caService.so) are installed in the $CDEVSHOBJ/1.7.
|
||||
All executables are installed in $CDEV/bin/$(ARCH).
|
||||
|
||||
9) Now you are ready to use cdev. If you decide to build extension part
|
||||
of cdev, you can go to extensions/cdevGenericServer directory.
|
||||
|
||||
10) Go to include/makeinclude directory. Make a link for a right Makefile.
|
||||
For example, on Linux machine, you will do
|
||||
ln -s Makefile.linux Makefile.OS.
|
||||
|
||||
11) Go back to $CDEV/extensions/cdevGenericServer. Type make (make sure
|
||||
it is gnu make). It should build everything from NameServer (rsvcServer)
|
||||
to libcdevGenericServer.a(so), libcdevClient.a(so),
|
||||
libcdevReactor.a(so), libcdevClientLite.a(so), librsvc.a(so) and
|
||||
rnsService.so. The rsvcServer will be in $CDEV/bin/$(ARCH), and
|
||||
rnsService.so is installed in $CDEVSHOBJ/1.7, the rest of them
|
||||
will be in $CDEV/lib/$(ARCH).
|
||||
|
||||
12) If you wish to use the generic CLIP service (used in communicating with
|
||||
CLIP servers written in Java), go to $CDEV/extensions/CLIPService
|
||||
and type make. The service will be placed into $CDEVSHOBJ/1.7.
|
||||
|
||||
13) If you wish to use cdevGateway (needed for Java clients), go to
|
||||
$CDEV/applications/cdevGateway and type make. Executable will be placed in
|
||||
$CDEVBIN and service in $CDEVSHOBJ/1.7.
|
||||
|
||||
|
||||
USING CDEV: After reviewing the documentation supplied with this cdev
|
||||
distribution, you should be able to construct a cdev application.
|
||||
|
||||
In order to compile this application you must perform the following:
|
||||
|
||||
1) Specify the cdev header files that you will be using within the
|
||||
source code.
|
||||
|
||||
2) Add the path to the cdev include files to your compiler command
|
||||
line.
|
||||
|
||||
example:
|
||||
|
||||
-I$(CDEV)/include
|
||||
|
||||
3) Add the path to the cdev libraries to your compiler or linker
|
||||
command line.
|
||||
|
||||
example:
|
||||
|
||||
-L$(CDEVROOT)/lib/solaris
|
||||
|
||||
4) Specify the cdev libraries to be linked to your application on
|
||||
the compiler or linker command line. These libraries are
|
||||
libEpicsCa.a and libcdev.a. Additionally, the yacc, lex
|
||||
and math libraries must be linked. (EpicsCa only needed for
|
||||
programs statically linking to EPICS channel access.)
|
||||
|
||||
a) Link with archived library
|
||||
|
||||
example:
|
||||
|
||||
-lcdev -lcaService -L$(EPICSLIB) -ly -ll -lm
|
||||
|
||||
b) Link with shared library
|
||||
|
||||
example:
|
||||
|
||||
-lcdev -ly -ll -lm
|
||||
|
||||
|
||||
5) Set the CDEVDDL environment variable. This is a variable
|
||||
specifying the location of DDL file (device definition file).
|
||||
This variable should be set prior to executing your new
|
||||
application.
|
||||
|
||||
example:
|
||||
|
||||
setenv CDEVDDL /usr/cdev/ddl/myFile.ddl
|
||||
|
||||
6) Set the CDEVSHOBJ environment variable if your application is linked
|
||||
with shared library. This is a variable specifying the directory of
|
||||
caService.so which contains all shared object codes for channel access.
|
||||
Default location is /usr/local/lib.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
ifneq ("$(VERBOSE)", "YES")
|
||||
MAKE := $(MAKE) -s VERBOSE=NO
|
||||
endif
|
||||
|
||||
all:
|
||||
@echo "=> Building CDEV Gateway Client/Server"
|
||||
@$(MAKE) -C server $@
|
||||
@$(MAKE) -C service $@
|
||||
@echo "<= Done...\n"
|
||||
|
||||
apps:
|
||||
@echo "=> Building Test Applications"
|
||||
@$(MAKE) -C test
|
||||
@echo "<= Done...\n"
|
||||
|
||||
clean:
|
||||
@echo "=> Cleaning CDEV Gateway Directories"
|
||||
@$(MAKE) -C server $@
|
||||
@$(MAKE) -C service $@
|
||||
@$(MAKE) -C test $@
|
||||
@echo "<= Done...\n"
|
||||
|
||||
purge:
|
||||
@echo "=> Purging CDEV Gateway Directories"
|
||||
@$(MAKE) -C server $@
|
||||
@$(MAKE) -C service $@
|
||||
@$(MAKE) -C test $@
|
||||
@rm -rf bin
|
||||
@echo "<= Done...\n"
|
||||
@@ -0,0 +1,37 @@
|
||||
!IF "$(VERBOSE)" != "YES"
|
||||
MAKE = $(MAKE) -s VERBOSE=NO
|
||||
!ENDIF
|
||||
|
||||
BASEDIR = $(MAKEDIR)
|
||||
|
||||
SERVER_DIR = $(BASEDIR)\server
|
||||
SERVICE_DIR = $(BASEDIR)\service
|
||||
APP_DIR = $(BASEDIR)\test
|
||||
|
||||
CLEAN_DIRS = $(SERVER_DIR)\
|
||||
$(SERVICE_DIR)\
|
||||
$(APP_DIR)
|
||||
|
||||
|
||||
all:
|
||||
@echo =^> Building CDEV Gateway Client/Server
|
||||
@for %d in ($(SERVER_DIR) $(SERVICE_DIR)) do @cd %d & $(MAKE) /NOLOGO /f NMakefile.mak
|
||||
@echo ^<= Done...
|
||||
|
||||
|
||||
apps:
|
||||
@echo =^> Building Test Applications
|
||||
@for %d in ($(APP_DIR)) do @cd %d & $(MAKE) /NOLOGO /f NMakefile.mak
|
||||
@echo ^<= Done...
|
||||
|
||||
|
||||
clean:
|
||||
@echo =^> Cleaning CDEV Gateway Directories
|
||||
@for %d in ($(CLEAN_DIRS)) do @cd %d & $(MAKE) /NOLOGO /f NMakefile.mak clean
|
||||
@echo ^<= Done...
|
||||
|
||||
purge:
|
||||
@echo =^> Purging CDEV Gateway Directories
|
||||
@for %d in ($(CLEAN_DIRS)) do @cd %d & $(MAKE) /NOLOGO /f NMakefile.mak purge
|
||||
-@rmdir /s /q $(BASEDIR)\bin
|
||||
@echo ^<= Done...
|
||||
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 948 B |
+875
@@ -0,0 +1,875 @@
|
||||
<! This document generated using mif2html Version 1.0 - Walt Akers - 1996 !>
|
||||
<head>
|
||||
<title>CDEV Gateway</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-VERSION ***!><font size=+2 color=Black>
|
||||
CDEV Gateway
|
||||
</p>
|
||||
<font size=+1>
|
||||
</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#TOCREF24">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#TOCREF25">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 2:
|
||||
<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 class-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>
|
||||
<a name="TOCREF12">
|
||||
Error:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF13">
|
||||
Meaning:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF14">
|
||||
Solution:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF15">
|
||||
Error:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF16">
|
||||
Meaning:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF17">
|
||||
Solution:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF18">
|
||||
Error:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF19">
|
||||
Meaning:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF20">
|
||||
Solution:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF21">
|
||||
Error:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF22">
|
||||
Meaning:
|
||||
</a> <!*** 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>
|
||||
<a name="TOCREF23">
|
||||
Solution:
|
||||
</a> <!*** 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="TOCREF24">
|
||||
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="TOCREF25">
|
||||
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 class-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 2:
|
||||
<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>
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#! /bin/csh
|
||||
|
||||
if( -f fmbatch.dat) rm fmbatch.dat
|
||||
if( -d html) rm -rf html
|
||||
mkdir -p html
|
||||
cp $CDEV/doc/bullet.jpg html
|
||||
|
||||
foreach x (`find . -name \*.doc -a ! -name \*TOC.doc -a ! -name \*LOF.doc`)
|
||||
echo "Open $x" >> fmbatch.dat
|
||||
echo "SaveAs ma $x html/`basename $x .doc`.mif" >> fmbatch.dat
|
||||
end
|
||||
|
||||
fmbatch fmbatch.dat
|
||||
|
||||
cd html
|
||||
|
||||
foreach x (`find . -name \*.mif -a ! -name \*TITLE.mif`)
|
||||
mif2html -t 'CDEV Gateway Documentation' -o `basename $x .mif`.html `basename $x .mif`TITLE.mif \-TOC \-LOF $x
|
||||
end
|
||||
|
||||
rm *.mif
|
||||
Binary file not shown.
Executable
+15
@@ -0,0 +1,15 @@
|
||||
ARCH = OS
|
||||
SHOBJ = YES
|
||||
|
||||
include $(CDEV)/extensions/cdevGenericServer/include/makeinclude/Makefile.$(ARCH)
|
||||
|
||||
APPNAME = "CDEV Gateway Server"
|
||||
CXXINCLUDES = -I./
|
||||
LIBS = -L$(CDEVLIB) -lcdevGenericServer $(CDEVLIBS) $(OSLIBS)
|
||||
|
||||
TARGETS = $(CDEVBIN)/cdevGateway
|
||||
|
||||
targets : $(TARGETS)
|
||||
|
||||
$(CDEVBIN)/cdevGateway : $(OBJDIR)/cdevGateway.o
|
||||
$(LINK.cc) -o $@ $^ $(LIBS)
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
.SUFFIXES: .cc .obj
|
||||
|
||||
APPNAME = "CDEV Gateway Program"
|
||||
ARCH = WINNT-4.0
|
||||
SHOBJ = YES
|
||||
|
||||
BINARIES = $(CDEVBIN)\cdevGateway.exe
|
||||
|
||||
include ..\..\..\extensions\cdevGenericServer\include\makeinclude\Makefile.WINNT-4.0
|
||||
|
||||
CXXINCLUDES = /I .\\
|
||||
|
||||
targets : $(BINARIES)
|
||||
|
||||
$(CDEVBIN)\cdevGateway.exe : .exec\$(TARGETDIR)\cdevGateway.obj
|
||||
-@if exist $@ erase $@
|
||||
@echo ^ ^ ^ ^ ^ ^ =^> Linking $(@F)
|
||||
$(LINK) $(CDEVLIB)\cdev.lib $(CDEVLIB)\cdevGenericServer.lib \
|
||||
$(LINK_EXE_FLAGS) /out:$@ $?
|
||||
@echo ^ ^ ^ ^ ^ ^ ^ ^ ^ Done...
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
#include <cdevDevice.h>
|
||||
#include <cdevRequestObject.h>
|
||||
#include <cdevCollection.h>
|
||||
#include <cdevCollectionRequest.h>
|
||||
|
||||
#include "cdevGateway.h"
|
||||
|
||||
GatewayServer *gatewayServer;
|
||||
|
||||
// *****************************************************************************
|
||||
// * GatewayServer::GatewayServer :
|
||||
// * This is the constructor for the gateway server. It initializes the
|
||||
// * underlying cdevServer object and sets the nextCollectionInt variable
|
||||
// * to zero.
|
||||
// *
|
||||
// * The constructor will also extract all of the file descriptors from the
|
||||
// * cdevSystem object and will create a GatewayHandler for each of them...
|
||||
// * The fdChangedCallback method will be register with the cdevSystem to
|
||||
// * ensure that these GatewayHandlers will be regularly updated/removed
|
||||
// * as they become connected and disconnected.
|
||||
// *****************************************************************************
|
||||
GatewayServer::GatewayServer ( char * domain, char * server, unsigned short port, double pulse )
|
||||
: cdevServer(domain, server, port, pulse), nextCollectionInt(0)
|
||||
{
|
||||
int fdBufSize = 256;
|
||||
int * fdBuf = NULL;
|
||||
|
||||
// *********************************************************************
|
||||
// * Get the list of all file descriptors that are in use by the
|
||||
// * cdevSystem class.
|
||||
// *********************************************************************
|
||||
do {
|
||||
fdBuf = new int[fdBufSize];
|
||||
if(cdevSystem::defaultSystem().getFd(fdBuf, fdBufSize)!=CDEV_SUCCESS)
|
||||
{
|
||||
delete fdBuf;
|
||||
fdBufSize *= 2;
|
||||
fdBuf = NULL;
|
||||
}
|
||||
} while (fdBuf==NULL);
|
||||
|
||||
// *********************************************************************
|
||||
// * Create a GatewayHandler to manage each of the file descriptors
|
||||
// * that was provided by the cdevSystem class, and register them with
|
||||
// * the Reactor.
|
||||
// *********************************************************************
|
||||
for(int i=0; i<fdBufSize; i++)
|
||||
{
|
||||
GatewayHandler * hdlr;
|
||||
hdlr = new GatewayHandler(cdevSystem::defaultSystem(), fdBuf[i]);
|
||||
Reactor.registerHandler(hdlr, cdevEventHandler::READ_MASK);
|
||||
}
|
||||
|
||||
// *********************************************************************
|
||||
// * Install the static fdChangedCallback method to be called each time
|
||||
// * one of the cdevSystem's file descriptors is added or deleted.
|
||||
// *********************************************************************
|
||||
cdevSystem::defaultSystem().addFdChangedCallback(fdChangedCallback, this);
|
||||
|
||||
// *********************************************************************
|
||||
// * Delete the temporary file descriptor buffer before returning.
|
||||
// *********************************************************************
|
||||
delete fdBuf;
|
||||
}
|
||||
|
||||
// *****************************************************************************
|
||||
// * GatewayServer::~GatewayServer :
|
||||
// * This is the virtual destructor for the cdevGateway class. It does
|
||||
// * nothing except serve as a placeholder to ensure that the delete
|
||||
// * mechanism calls the most senior object.
|
||||
// *****************************************************************************
|
||||
GatewayServer::~GatewayServer ( void )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// *****************************************************************************
|
||||
// * GatewayServer::fdChangedCallback :
|
||||
// * This method will be called by CDEV anytime one of the file descriptors
|
||||
// * associated with the cdevSystem is added or deleted. This method may
|
||||
// * then add or delete the file descriptor from the Reactor object.
|
||||
// *****************************************************************************
|
||||
void GatewayServer::fdChangedCallback (int fd, int opened, void * arg )
|
||||
{
|
||||
GatewayServer * server = (GatewayServer *)arg;
|
||||
|
||||
if(opened)
|
||||
{
|
||||
GatewayHandler * hdlr;
|
||||
hdlr = new GatewayHandler(cdevSystem::defaultSystem(), fd);
|
||||
server->Reactor.registerHandler(hdlr, cdevEventHandler::READ_MASK);
|
||||
}
|
||||
else server->Reactor.removeHandler(fd);
|
||||
}
|
||||
|
||||
|
||||
// *****************************************************************************
|
||||
// * GatewayServer::handleTimeout :
|
||||
// * This is the handleTimeout method. It is called by the cdevReactor
|
||||
// * periodically to make sure that all events are being handled.
|
||||
// *****************************************************************************
|
||||
int GatewayServer::handleTimeout ( void )
|
||||
{
|
||||
cdevSystem::defaultSystem().pend(0.001);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// *****************************************************************************
|
||||
// * GatewayServer::processMessages :
|
||||
// * This is the processMessages method. It receives the inbound requests
|
||||
// * from the clients and then calls CDEV to process the requests.
|
||||
// *****************************************************************************
|
||||
void GatewayServer::processMessages ( void )
|
||||
{
|
||||
int data_handled = 0;
|
||||
cdevMessage * request;
|
||||
while(dequeue(request)==0)
|
||||
{
|
||||
if(!strcmp(request->getMessage(), "register") ||
|
||||
!strcmp(request->getMessage(), "unregister"))
|
||||
{
|
||||
enqueue(request);
|
||||
delete (request);
|
||||
}
|
||||
else
|
||||
{
|
||||
int result (CDEV_SUCCESS);
|
||||
cdevCallback cb (gatewayCallback, request);
|
||||
int deviceCount (request->getDeviceCount());
|
||||
char ** deviceList = request->getDeviceList();
|
||||
char * message = request->getMessage();
|
||||
cdevData * context = request->getContext();
|
||||
cdevData * dataOut = request->getData();
|
||||
cdevRequestObject * req = NULL;
|
||||
|
||||
if(deviceCount<=0 || deviceList==NULL || message==NULL)
|
||||
{
|
||||
result = CDEV_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(deviceCount==1)
|
||||
{
|
||||
req = cdevRequestObject::attachPtr(deviceList[0], message);
|
||||
}
|
||||
else {
|
||||
char name[32];
|
||||
sprintf(name, "~Collection%i", nextCollectionInt++);
|
||||
cdevCollection *col = cdevCollection::attachPtr(name);
|
||||
col->add(deviceCount, deviceList);
|
||||
req = col->getRequestObject(message);
|
||||
}
|
||||
if(context) req->setContext(*context);
|
||||
result = req->sendCallback(dataOut, cb);
|
||||
if(result==CDEV_SUCCESS) data_handled++;
|
||||
}
|
||||
|
||||
if(result != CDEV_SUCCESS)
|
||||
{
|
||||
request->setCompletionCode(result);
|
||||
enqueue(request);
|
||||
delete request;
|
||||
}
|
||||
}
|
||||
|
||||
// *********************************************************************
|
||||
// * Note: The developer MUST do a pend at this point in order to
|
||||
// * have the file descriptors updated... However, the wait time can be
|
||||
// * very, very short.
|
||||
// *********************************************************************
|
||||
if(data_handled) cdevSystem::defaultSystem().pend(0.000001);
|
||||
}
|
||||
}
|
||||
|
||||
// *****************************************************************************
|
||||
// * GatewayServer::gatewayCallback :
|
||||
// * This is the callback function that is called each time a request has
|
||||
// * been processed by CDEV. The cdevMessage that was used to make the
|
||||
// * request is stored in the userarg parameter and this method will pass
|
||||
// * the result to the cdevGateway for processing.
|
||||
// *
|
||||
// * When the isTransactionDone flag is set to TRUE, this method will
|
||||
// * delete the cdevMessage object.
|
||||
// *****************************************************************************
|
||||
void GatewayServer::gatewayCallback ( int status, void *userarg, cdevRequestObject &, cdevData &data)
|
||||
{
|
||||
cdevMessage * message = (cdevMessage *)userarg;
|
||||
|
||||
|
||||
message->setCompletionCode(status);
|
||||
message->setData(&data, 1);
|
||||
message->setOperationCode(cdevCallback::isTransactionDone()?1:0);
|
||||
gatewayServer->enqueue(message);
|
||||
message->setData(NULL);
|
||||
|
||||
if(cdevCallback::isTransactionDone()) delete message;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
char serverName[255];
|
||||
int serverPort = 9573;
|
||||
int mismatch = 0;
|
||||
|
||||
strcpy(serverName, "Gateway1");
|
||||
|
||||
for(int i=1; i<argc && !mismatch; i++)
|
||||
{
|
||||
char * ptr;
|
||||
switch(*argv[i])
|
||||
{
|
||||
case 's':
|
||||
if((ptr = strchr(argv[i], '='))!=NULL && *(++ptr))
|
||||
{
|
||||
strcpy(serverName, ptr);
|
||||
}
|
||||
else mismatch = 1;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
if((ptr = strchr(argv[i], '='))!=NULL && *(++ptr))
|
||||
{
|
||||
if((serverPort = atoi(ptr))==0)
|
||||
{
|
||||
mismatch = 1;
|
||||
}
|
||||
}
|
||||
else mismatch = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
mismatch = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(mismatch)
|
||||
{
|
||||
fprintf(stderr, "%s <s=server name> <p=server port>\\n", argv[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
gatewayServer = new GatewayServer("GATEWAY", serverName, serverPort, 60);
|
||||
gatewayServer->runServer();
|
||||
}
|
||||
return mismatch?-1:0;
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
#if !defined (_CDEV_GATEWAY_H)
|
||||
#define _CDEV_GATEWAY_H
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cdevSystem.h>
|
||||
#include <cdevServer.h>
|
||||
|
||||
class GatewayServer : public cdevServer
|
||||
{
|
||||
private:
|
||||
int nextCollectionInt;
|
||||
|
||||
public:
|
||||
GatewayServer ( char * domain, char * server, unsigned short port, double pulse );
|
||||
virtual ~GatewayServer ( void );
|
||||
virtual int handleTimeout ( void );
|
||||
virtual void processMessages ( void );
|
||||
|
||||
static void gatewayCallback ( int, void *, cdevRequestObject &, cdevData &);
|
||||
static void fdChangedCallback ( int fd, int opened, void * arg );
|
||||
};
|
||||
|
||||
|
||||
|
||||
class GatewayHandler : public cdevEventHandler
|
||||
{
|
||||
friend class GatewayServer;
|
||||
|
||||
public:
|
||||
GatewayHandler (cdevSystem & Sys, int Fd) : sys(Sys), fd(Fd) {}
|
||||
virtual ~GatewayHandler (void) {};
|
||||
virtual int getHandle (void) const { return fd; }
|
||||
virtual int handleInput (void) { sys.pend(1.0); return 0; }
|
||||
virtual int handleOutput (void) { sys.pend(1.0); return 0; }
|
||||
virtual int handleClose (void) { return 0; }
|
||||
|
||||
protected:
|
||||
int fd;
|
||||
cdevSystem & sys;
|
||||
};
|
||||
|
||||
#endif /* _CDEV_GATEWAY_H */
|
||||
Binary file not shown.
+17
@@ -0,0 +1,17 @@
|
||||
#include <GatewayService.h>
|
||||
|
||||
extern "C" cdevService * newGatewayService ( char * name, cdevSystem * system )
|
||||
{
|
||||
return new GatewayService(name, *system);
|
||||
}
|
||||
|
||||
GatewayService::GatewayService ( char * name, cdevSystem & system)
|
||||
: cdevClientService("GATEWAY", name, system)
|
||||
{
|
||||
system.reportError(CDEV_SEVERITY_INFO, "GatewayService", NULL,
|
||||
"Constructing a new GatewayService");
|
||||
}
|
||||
|
||||
GatewayService::~GatewayService ( void )
|
||||
{
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#include <cdevClientService.h>
|
||||
|
||||
#ifndef GATEWAY_SERVICE_API
|
||||
#define GATEWAY_SERVICE_API
|
||||
#endif
|
||||
|
||||
extern "C" GATEWAY_SERVICE_API cdevService * newGatewayService ( char * name, cdevSystem * system );
|
||||
|
||||
class GatewayService : public cdevClientService
|
||||
{
|
||||
public:
|
||||
GatewayService ( char * name, cdevSystem & system = cdevSystem::defaultSystem());
|
||||
|
||||
protected:
|
||||
virtual ~GatewayService ( void );
|
||||
};
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
ARCH = OS
|
||||
SHOBJ = YES
|
||||
|
||||
include $(CDEV)/extensions/cdevGenericServer/include/makeinclude/Makefile.$(ARCH)
|
||||
|
||||
APPNAME = "CDEV Gateway Service"
|
||||
CXXINCLUDES = -I./
|
||||
|
||||
# ******************************************************************************
|
||||
# * The BINARIES definition names all of the binary files that should be deleted
|
||||
# * whenever "make clean" is executed.
|
||||
# ******************************************************************************
|
||||
BINARIES = $(CDEVLIB)/libGatewayService.a \
|
||||
$(CDEVLIB)/GatewayService.so
|
||||
|
||||
ifeq ($(SHOBJ), YES)
|
||||
LIBS = -L$(CDEVLIB) -lcdevGenericServer $(CDEVLIBS) $(OSLIBS)
|
||||
TARGETS = $(CDEVLIB)/GatewayService.so
|
||||
else
|
||||
LIBS = -L$(CDEVLIB) -lcdevGenericServer $(CDEVLIBS) $(OSLIBS)
|
||||
TARGETS = $(CDEVLIB)/libGatewayService.a
|
||||
endif
|
||||
|
||||
targets : $(TARGETS)
|
||||
|
||||
$(CDEVLIB)/GatewayService.so : $(OBJDIR)/GatewayService.o
|
||||
$(LINK.so) -o $@ $^ -L$(CDEVLIB) -lcdevGenericServer $(NETLIBS)
|
||||
@mkdir -p $(CDEVSHOBJ)/$(CDEVVERSION)
|
||||
@cp $@ $(CDEVSHOBJ)/$(CDEVVERSION)/$(@F)
|
||||
|
||||
$(CDEVLIB)/libGatewayService.a : $(OBJDIR)/GatewayService.o
|
||||
$(LINK.a) $@ $^
|
||||
@$(RANLIB) $@ > /dev/null
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
.SUFFIXES: .cc .obj
|
||||
|
||||
APPNAME = "CDEV Gateway Service"
|
||||
ARCH = WINNT-4.0
|
||||
SHOBJ = YES
|
||||
|
||||
BINARIES = $(CDEVLIB)\GatewayService.lib \
|
||||
$(CDEVLIB)\GatewayService.dll
|
||||
|
||||
include ..\..\..\extensions\cdevGenericServer\include\makeinclude\Makefile.WINNT-4.0
|
||||
|
||||
CXXINCLUDES = /I .\\
|
||||
CXXEXTRA_DLL = /D "GATEWAY_SERVICE_API=__declspec(dllexport)"
|
||||
CXXEXTRA_LIB = /D "GATEWAY_SERVICE_API="
|
||||
|
||||
!IF "$(SHOBJ)" == "YES"
|
||||
TARGETS = $(CDEVLIB)\GatewayService.dll
|
||||
!ELSE
|
||||
TARGETS = $(CDEVLIB)\GatewayService.lib
|
||||
!ENDIF
|
||||
|
||||
targets : $(TARGETS)
|
||||
|
||||
$(CDEVLIB)\GatewayService.dll : $(OBJDIR)\GatewayService.obj
|
||||
@echo ^ ^ ^ =^> Linking $(@F)
|
||||
-@if exist $@ erase $@
|
||||
-@if not exist $(@D) mkdir $(@D)
|
||||
@$(LIB32) $(CDEVLIB)\cdev.lib $(CDEVLIB)\cdevGenericServer.lib\
|
||||
$(LINK_DLL_FLAGS) /out:$@ /implib:$(@D)\$(@B).lib $?
|
||||
-@copy $@ $(CDEVSHOBJ)\$(CDEVVERSION)\$(@F) > nul
|
||||
@echo ^ ^ ^ ^ ^ ^ Done...
|
||||
|
||||
$(CDEVLIB)\GatewayService.lib : $(OBJDIR)\GatewayService.obj
|
||||
@echo ^ ^ ^ =^> Linking $(@F)
|
||||
-@if exist $@ erase $@
|
||||
-@if not exist $(@D) mkdir $(@D)
|
||||
@$(LIB32) $(CDEVLIB)\cdev.lib $(CDEVLIB)\cdevGenericServer.lib\
|
||||
$(LINK_LIB_FLAGS) /out:$@ $?
|
||||
@echo ^ ^ ^ ^ ^ ^ Done...
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
ARCH = OS
|
||||
SHOBJ = YES
|
||||
|
||||
include $(CDEV)/extensions/cdevGenericServer/include/makeinclude/Makefile.$(ARCH)
|
||||
|
||||
APPNAME = "CDEV Gateway Test Applications"
|
||||
CXXINCLUDES = -I./ -I../
|
||||
LIBS = -L$(CDEVLIB) -lcdevGenericServer $(CDEVLIBS) $(OSLIBS)
|
||||
OUTPUTDIR = ../bin/$(TARGETDIR)
|
||||
TARGETS = $(OUTPUTDIR)/TestProgram $(OUTPUTDIR)/monitorTest
|
||||
|
||||
targets : $(TARGETS)
|
||||
|
||||
|
||||
$(OUTPUTDIR)/TestProgram : $(OBJDIR)/TestProgram.o
|
||||
$(LINK.cc) $^ -o $@ $(LIBS)
|
||||
|
||||
$(OUTPUTDIR)/monitorTest : $(OBJDIR)/monitorTest.o
|
||||
$(LINK.cc) $^ -o $@ $(LIBS)
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
service MonitorTest
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class GatewayBase
|
||||
{
|
||||
verbs {get}
|
||||
attributes
|
||||
{
|
||||
ClientInfo Gateway {server=Gateway1};
|
||||
ServerInfo Gateway {server=Gateway1};
|
||||
}
|
||||
}
|
||||
class MonitorTests
|
||||
{
|
||||
verbs {get, set, monitorOn, monitorOff}
|
||||
attributes
|
||||
{
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
attrib0 Gateway {server=Gateway1};
|
||||
attrib1 MonitorTest {server=MonitorTestServer};
|
||||
attrib2 Gateway {server=Gateway1};
|
||||
attrib3 Gateway {server=Gateway1};
|
||||
attrib4 Gateway {server=Gateway1};
|
||||
attrib5 Gateway {server=Gateway1};
|
||||
attrib6 Gateway {server=Gateway1};
|
||||
attrib7 Gateway {server=Gateway1};
|
||||
attrib8 Gateway {server=Gateway1};
|
||||
attrib9 Gateway {server=Gateway1};
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MonitorTests :
|
||||
device0, device1, device2, device3, device4,
|
||||
device5, device6, device7, device8, device9
|
||||
;
|
||||
|
||||
GatewayBase : Gateway1;
|
||||
@@ -0,0 +1,34 @@
|
||||
service MonitorTest
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class MonitorTests
|
||||
{
|
||||
verbs {get, set, monitorOn, monitorOff}
|
||||
attributes
|
||||
{
|
||||
default MonitorTest;
|
||||
servers MonitorTest;
|
||||
attrib0 MonitorTest {server=MonitorTestServer};
|
||||
attrib1 MonitorTest {server=MonitorTestServer};
|
||||
attrib2 MonitorTest {server=MonitorTestServer};
|
||||
attrib3 MonitorTest {server=MonitorTestServer};
|
||||
attrib4 MonitorTest {server=MonitorTestServer};
|
||||
attrib5 MonitorTest {server=MonitorTestServer};
|
||||
attrib6 MonitorTest {server=MonitorTestServer};
|
||||
attrib7 MonitorTest {server=MonitorTestServer};
|
||||
attrib8 MonitorTest {server=MonitorTestServer};
|
||||
attrib9 MonitorTest {server=MonitorTestServer};
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect MonitorTest;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MonitorTests :
|
||||
device0, device1, device2, device3, device4,
|
||||
device5, device6, device7, device8, device9
|
||||
;
|
||||
@@ -0,0 +1,29 @@
|
||||
.SUFFIXES: .cc .obj
|
||||
|
||||
APPNAME = CDEV Gateway Test Applications
|
||||
ARCH = WINNT-4.0
|
||||
SHOBJ = YES
|
||||
OUTPUTDIR = ..\bin\$(TARGETDIR)
|
||||
BINARIES = $(OUTPUTDIR)\TestProgram.exe $(OUTPUTDIR)\monitorTest.exe
|
||||
|
||||
include ..\..\..\extensions\cdevGenericServer\include\makeinclude\Makefile.WINNT-4.0
|
||||
|
||||
TARGETS = $(BINARIES)
|
||||
CXXINCLUDES = /I .\\
|
||||
|
||||
targets : $(BINARIES)
|
||||
|
||||
$(OUTPUTDIR)\TestProgram.exe : .exec\$(TARGETDIR)\TestProgram.obj
|
||||
-@if not exist $(OUTPUTDIR) mkdir $(OUTPUTDIR)
|
||||
-@if exist $@ erase $@
|
||||
@echo ^ ^ ^ ^ ^ ^ =^> Linking $(@F)
|
||||
$(LINK) $(CDEVLIB)\cdev.lib $(CDEVLIB)\cdevGenericServer.lib \
|
||||
$(LINK_EXE_FLAGS) /out:$@ $?
|
||||
@echo ^ ^ ^ ^ ^ ^ ^ ^ ^ Done...
|
||||
|
||||
$(OUTPUTDIR)\monitorTest.exe : .exec\$(TARGETDIR)\monitorTest.obj
|
||||
-@if exist $@ erase $@
|
||||
@echo ^ ^ ^ ^ ^ ^ =^> Linking $(@F)
|
||||
$(LINK) $(CDEVLIB)\cdev.lib $(CDEVLIB)\cdevGenericServer.lib \
|
||||
$(LINK_EXE_FLAGS) /out:$@ $?
|
||||
@echo ^ ^ ^ ^ ^ ^ ^ ^ ^ Done...
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#include <cdevSystem.h>
|
||||
#include <cdevRequestObject.h>
|
||||
#include <cdevDevice.h>
|
||||
#include <cdevGroup.h>
|
||||
#include <cdevCommon.h>
|
||||
|
||||
int fouled = 0;
|
||||
int expectedHits = 0;
|
||||
int hits = 0;
|
||||
unsigned totalCount = 0;
|
||||
|
||||
void callback ( int status, void * arg, cdevRequestObject &, cdevData &)
|
||||
{
|
||||
hits++;
|
||||
if(status!=CDEV_SUCCESS)
|
||||
{
|
||||
printf("ERROR: Transmission failure of %i\n", (int)arg);
|
||||
}
|
||||
else {
|
||||
fprintf(stdout, ".");
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
cdevCallback cb(callback, NULL);
|
||||
cdevRequestObject &treq = cdevRequestObject::attachRef("IPM1S01", "get VAL");
|
||||
|
||||
|
||||
fprintf(stdout, "sending...\n");
|
||||
for(int i=0; i<1000; i++) treq.sendCallback(NULL, cb);
|
||||
fprintf(stdout, "waiting...\n");
|
||||
while(hits<1000) cdevSystem::defaultSystem().pend(.1);
|
||||
fprintf(stdout, "done.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class Gateways
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
VAL Gateway {server=Gateway1};
|
||||
GMES Gateway {server=Gateway1};
|
||||
PMES Gateway {server=Gateway1};
|
||||
betax Gateway {server=Gateway1};
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
attrib Gateway {server=Gateway1};
|
||||
ServerInfo Gateway {server=Gateway1};
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gateways :
|
||||
IPM1S01, R121
|
||||
;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class Gateways
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
VAL Gateway {server=Gateway2};
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gateways :
|
||||
IPM1S01
|
||||
;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class Gateways
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
VAL Gateway {server=Gateway3};
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gateways :
|
||||
IPM1S01
|
||||
;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class Gateways
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
VAL Gateway {server=Gateway4};
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gateways :
|
||||
IPM1S01
|
||||
;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class Gateways
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
VAL Gateway {server=Gateway5};
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gateways :
|
||||
IPM1S01
|
||||
;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class Gateways
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
VAL Gateway {server=Gateway6};
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gateways :
|
||||
IPM1S01
|
||||
;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class Gateways
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
VAL Gateway {server=Gateway7};
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gateways :
|
||||
IPM1S01
|
||||
;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class Gateways
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
VAL Gateway {server=Gateway8};
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gateways :
|
||||
IPM1S01
|
||||
;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
service Gateway
|
||||
{
|
||||
tags {server}
|
||||
}
|
||||
|
||||
class Gateways
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
VAL Gateway {server=Gateway9};
|
||||
default Gateway;
|
||||
servers Gateway;
|
||||
}
|
||||
messages
|
||||
{
|
||||
disconnect Gateway;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Gateways :
|
||||
IPM1S01
|
||||
;
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
#include <cdevSystem.h>
|
||||
#include <cdevRequestObject.h>
|
||||
#include <cdevDevice.h>
|
||||
#include <cdevGroup.h>
|
||||
#include <cdevCommon.h>
|
||||
#include <cdevClock.h>
|
||||
|
||||
int callbackCount = 0;
|
||||
|
||||
void monitorCallback (int status, void *, cdevRequestObject &, cdevData &)
|
||||
{
|
||||
if (status==CDEV_SUCCESS) callbackCount++;
|
||||
}
|
||||
|
||||
#define POSTCOUNT 1
|
||||
#define REPEATCOUNT 2
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
if(argc<4)
|
||||
{
|
||||
printf("Format is: %s [device] [attrib] [time in seconds]\n", argv[0]);
|
||||
return 0;
|
||||
}
|
||||
int seconds = atoi(argv[3]);
|
||||
if(seconds==0)
|
||||
{
|
||||
printf("Format is: %s [device] [attrib] [time in seconds]\n", argv[0]);
|
||||
printf("Time period of 0 specified...\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
cdevCallback cb(monitorCallback, NULL);
|
||||
char command[255];
|
||||
|
||||
sprintf(command, "monitorOn %s", argv[2]);
|
||||
cdevRequestObject & mOnReq = cdevRequestObject::attachRef(argv[1], command);
|
||||
|
||||
sprintf(command, "monitorOff %s", argv[2]);
|
||||
cdevRequestObject & mOffReq = cdevRequestObject::attachRef(argv[1], command);
|
||||
|
||||
printf("Receiving monitors on device: %s, attribute: %s for %i seconds...\n", argv[1], argv[2], seconds);
|
||||
cdevClock timer;
|
||||
timer.schedule(NULL, (double)seconds);
|
||||
mOnReq.sendCallback(NULL, cb);
|
||||
while(!timer.expired()) cdevSystem::defaultSystem().poll();
|
||||
mOffReq.sendCallback(NULL, cb);
|
||||
|
||||
printf("Received %i callbacks in %i seconds - %f callbacks/second\n", callbackCount, seconds, (double)callbackCount/seconds);
|
||||
return 0;
|
||||
}
|
||||
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 948 B |
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
+283
@@ -0,0 +1,283 @@
|
||||
# fm2html tags file
|
||||
# The tags file defines the correspondence between FrameMaker tags and the
|
||||
# tags used by fm2html. This file can be edited so that your FrameMaker
|
||||
# files will be translated "correctly". Each line in the file is made up
|
||||
# of a pair of tag names. The first specifies the FrameMaker tag and the
|
||||
# second specifies the internal tag that it corresponds to. Each FrameMaker
|
||||
# tag may only be bound to one internal tag, but it can be bound to an
|
||||
# internal tag already bound to another FrameMaker tag. The '#' character
|
||||
# denotes a comment; the rest of the line is considered a comment. The tag
|
||||
# names must be written in the correct case (lower/upper/mixed).
|
||||
|
||||
HEADING0 HEADING0 # These are translated to HTML headings <H1>
|
||||
HEADING1 HEADING1 # to <H6> (HEADING0 becomes <H1>, HEADING1
|
||||
HEADING2 HEADING2 # becomes <H2>, etc.). Links to them are
|
||||
HEADING3 HEADING3 # placed in the automatically generated table
|
||||
HEADING4 HEADING4 # of contents. The FrameMaker paragraph
|
||||
HEADING5 HEADING5 # numbering is used. You probably don't want
|
||||
HEADING6 HEADING6 # to use HEADING0, as TITLE and LOCALTITLE are
|
||||
# translated to <H1>. HEADING6 is translated
|
||||
# to <H6> as there is no <H7> in basic HMTL.
|
||||
|
||||
UHEADING0 UHEADING0 # These are translated to HTML headings <H1>
|
||||
UHEADING1 UHEADING1 # to <H6>; however, they are omitted from the
|
||||
UHEADING2 UHEADING2 # automatically generated table of contents.
|
||||
UHEADING3 UHEADING3 # The FrameMaker paragraph numbering is used.
|
||||
UHEADING4 UHEADING4 # The comments above regarding HEADING0 and
|
||||
UHEADING5 UHEADING5 # HEADING6 also apply to UHEADING0 and
|
||||
UHEADING6 UHEADING6 # UHEADING6.
|
||||
|
||||
INDENTHEADING0 INDENTHEADING0 # These are the same as UHEADING, but are
|
||||
INDENTHEADING1 INDENTHEADING1 # indented one level using the HTML <UL> tag.
|
||||
INDENTHEADING2 INDENTHEADING2 # The comments above regarding HEADING0 and
|
||||
INDENTHEADING3 INDENTHEADING3 # HEADING6 also apply to INDENTHEADING0
|
||||
INDENTHEADING4 INDENTHEADING4 # and INDENTHEADING6.
|
||||
INDENTHEADING5 INDENTHEADING5
|
||||
INDENTHEADING6 INDENTHEADING6
|
||||
|
||||
BODY BODY # Normal text.
|
||||
|
||||
GLOSSARY1 GLOSSARY1 # FrameMaker lists of the type:
|
||||
GLOSSARY2 GLOSSARY2 # short<TAB>long text
|
||||
GLOSSARY3 GLOSSARY3 # short<TAB>long text
|
||||
COMGLOSSARY1 COMGLOSSARY1 # short<TAB>long text
|
||||
COMGLOSSARY2 COMGLOSSARY2 # etc.
|
||||
COMGLOSSARY3 COMGLOSSARY3 # Translated to :
|
||||
# <DL>
|
||||
# <DT>short<DD>long text
|
||||
# <DT>short<DD>long text
|
||||
# <DT>short<DD>long text
|
||||
# etc.
|
||||
# </DL>
|
||||
# If the paragraph type is COMGLOSSARY then
|
||||
# <DL> becomes <DL COMPACT>. This means that
|
||||
# the viewer will try to fit the short text
|
||||
# and the long text in one line. Otherwise
|
||||
# the short text will be on a separate line
|
||||
# with the long text below shifted to the
|
||||
# right. This should give a reasonable result
|
||||
# given that the short text is up to 4
|
||||
# characters long. Otherwise the long text is
|
||||
# displayed on a separate line (viewer-
|
||||
# dependent).
|
||||
#
|
||||
# GLOSSARY2, GLOSSARY3, COMGLOSSARY2 and
|
||||
# COMGLOSSARY3 are indented.
|
||||
|
||||
PROGRAM PROGRAM # Program code is considered to be
|
||||
# preformatted (<PRE> in HTML).
|
||||
|
||||
REFERENCE REFERENCE # Assumed to be FrameMaker lines of the type:
|
||||
COMREFERENCE COMREFERENCE # [1] Reference 1
|
||||
# [2] Reference 2
|
||||
# [3] Reference 3
|
||||
# etc.
|
||||
# where the [?] is the paragraph numbering.
|
||||
# Becomes:
|
||||
# <DL>
|
||||
# <DT>[1]<DD>Reference 1
|
||||
# <DT>[2]<DD>Reference 2
|
||||
# <DT>[3]<DD>Reference 3
|
||||
# etc.
|
||||
# </DL>
|
||||
# If the paragraph type is COMREFERENCE then
|
||||
# <DL> becomes <DL COMPACT>. This means that
|
||||
# the viewer will try to fit the paragraph
|
||||
# numbering and and the reference text in one
|
||||
# line. Otherwise the paragraph numbering
|
||||
# will be on a separate line with the
|
||||
# reference text below shifted to the right.
|
||||
|
||||
TITLE TITLE # The title of the document. It is always
|
||||
# moved to the head of the file (or indexfile),
|
||||
# before the automatically generated index.
|
||||
# Translates as HTML <H1>.
|
||||
|
||||
LOCALTITLE LOCALTITLE # The title of the current chapter or file.
|
||||
# Printed wherever it is. Translates as HTML
|
||||
# <H1>.
|
||||
|
||||
TOC TOC # Paragraphs with this tag are removed. All
|
||||
# paragraphs with paragraph tags with "TOC",
|
||||
# "IX", "LOT", "LOF", "AIX", "AML", "APL",
|
||||
# "IOM", "LOM", "LOP" or "SIX" in them are
|
||||
# also removed. They are assumed to be
|
||||
# generated by FrameMaker.
|
||||
|
||||
ADDRESS ADDRESS # Corresponds to the <ADDRESS> tag in HTML.
|
||||
|
||||
AUTHOR AUTHOR # The author of the document. This is moved
|
||||
# to the head of the file (or indexfile),
|
||||
# after the title and before the automatically
|
||||
# generated index). Uses <ADDRESS> HTML tag.
|
||||
|
||||
ABSTRACT ABSTRACT # The abstract is emphasized (<EM> tag in
|
||||
# HTML).
|
||||
|
||||
ACRONYM ACRONYM # This is handled the same as COMGLOSSARY.
|
||||
|
||||
LISTINDENT1 LISTINDENT1 # Non-consecutive lists with full indent
|
||||
LISTINDENT2 LISTINDENT2 # (HTML: <DL><DD>item)
|
||||
LISTINDENT3 LISTINDENT3
|
||||
LISTINDENT4 LISTINDENT4
|
||||
LISTINDENT5 LISTINDENT5
|
||||
LISTINDENT6 LISTINDENT6
|
||||
|
||||
LISTBULLET1 LISTBULLET1 # Non-consecutive lists with bullet as mark
|
||||
LISTBULLET2 LISTBULLET2 # (HTML: <UL><LI>item)
|
||||
LISTBULLET3 LISTBULLET3
|
||||
LISTBULLET4 LISTBULLET4
|
||||
LISTBULLET5 LISTBULLET5
|
||||
LISTBULLET6 LISTBULLET6
|
||||
|
||||
LISTMARK1 LISTMARK1 # Lists using MIF PgfNumString as mark
|
||||
LISTMARK2 LISTMARK2 # (HTML: <DL><DT>mark<DD>item)
|
||||
LISTMARK3 LISTMARK3
|
||||
LISTMARK4 LISTMARK4
|
||||
LISTMARK5 LISTMARK5
|
||||
LISTMARK6 LISTMARK6
|
||||
|
||||
LISTNUMBER1 LISTNUMBER1 # Numbered consecutive lists
|
||||
LISTNUMBER2 LISTNUMBER2 # (HTML: <OL><LI>item)
|
||||
LISTNUMBER3 LISTNUMBER3
|
||||
LISTNUMBER4 LISTNUMBER4
|
||||
LISTNUMBER5 LISTNUMBER5
|
||||
LISTNUMBER6 LISTNUMBER6
|
||||
|
||||
LISTCONTINUE1 LISTCONTINUE1 # Additional paragraphs in any type of list
|
||||
LISTCONTINUE2 LISTCONTINUE2
|
||||
LISTCONTINUE3 LISTCONTINUE3
|
||||
LISTCONTINUE4 LISTCONTINUE4
|
||||
LISTCONTINUE5 LISTCONTINUE5
|
||||
LISTCONTINUE6 LISTCONTINUE6
|
||||
|
||||
FIGURE FIGURE # Figure text is indented
|
||||
|
||||
TABLE TABLE # Table text is indented
|
||||
|
||||
CELLHEADING CELLHEADING # Table heading becomes bold
|
||||
CELLBODY CELLBODY # Table cells become normal text
|
||||
|
||||
FOOTNOTE BODY # Footnotes are treated as normal text
|
||||
|
||||
HTML1 HTML <P><B>;</B> # User defined tags. First specify start
|
||||
HTML2 HTML <P><B><I>;</I></B> # tag(s) then ; and then optional end tag(s).
|
||||
|
||||
# Add your own tag mappings below
|
||||
|
||||
Numbered LISTNUMBER1
|
||||
Indented LISTINDENT1
|
||||
FUNC_NAME BODY
|
||||
FUNC_PROTO BODY
|
||||
FUNC_DEF BODY
|
||||
FUNC_DEF2 BODY
|
||||
Bulleted LISTBULLET1
|
||||
OMT_METHOD BODY
|
||||
FIGURE_CONT BODY
|
||||
FUNCTION_DEF BODY
|
||||
Centered INDENTHEADING2
|
||||
Heading1 HEADING2
|
||||
Numbered1 LISTNUMBER1
|
||||
IndentedBold INDENTHEADING1
|
||||
HeadingRunIn INDENTHEADING1
|
||||
|
||||
Abstract ABSTRACT
|
||||
Acronym ACRONYM
|
||||
Address BODY
|
||||
Bibliography BODY
|
||||
Blank Page Msg BODY
|
||||
Body BODY
|
||||
Change TABLE
|
||||
Credit COMGLOSSARY1
|
||||
Doc (Applicable) COMREFERENCE
|
||||
Doc (Reference) COMREFERENCE
|
||||
Equation BODY
|
||||
Equation (Appendix) BODY
|
||||
Example BODY
|
||||
Figure Title FIGURE
|
||||
Figure TitleLOF BODY
|
||||
Figure Title (Appendix) FIGURE
|
||||
Footer BODY
|
||||
Footnote BODY
|
||||
Guideline BODY
|
||||
Header BODY
|
||||
Heading 1 HEADING1
|
||||
Heading 1TOC UHEADING1
|
||||
Heading 1 (Appendix) HEADING1
|
||||
Heading 1 (Appendix)TOC UHEADING1
|
||||
Heading 2 HEADING2
|
||||
Heading 2TOC UHEADING2
|
||||
Heading 2 (Appendix) HEADING2
|
||||
Heading 2 (Appendix)TOC UHEADING2
|
||||
Heading 3 HEADING3
|
||||
Heading 3TOC UHEADING3
|
||||
Heading 3 (Appendix) HEADING3
|
||||
Heading 3 (Appendix)TOC UHEADING3
|
||||
Heading 4 HEADING4
|
||||
Heading 4TOC UHEADING4
|
||||
Heading 4 (Appendix) HEADING4
|
||||
Heading 4 (Appendix)TOC UHEADING4
|
||||
Heading 5 HEADING5
|
||||
Heading 5TOC UHEADING5
|
||||
Heading 5 (Appendix) HEADING5
|
||||
Heading 5 (Appendix)TOC UHEADING5
|
||||
Heading 6 HEADING6
|
||||
Heading 6TOC UHEADING6
|
||||
Heading 6 (Appendix) HEADING6
|
||||
Heading 6 (Appendix)TOC UHEADING6
|
||||
List Initialize BODY
|
||||
List Bullet 1 LISTBULLET1
|
||||
List Bullet 2 LISTBULLET2
|
||||
List Bullet 3 LISTBULLET3
|
||||
List Bullet 4 LISTBULLET4
|
||||
List Bullet 5 LISTBULLET5
|
||||
List Bullet 6 LISTBULLET6
|
||||
List Char 1 LISTNUMBER1
|
||||
List Char 2 LISTNUMBER2
|
||||
List Char 3 LISTNUMBER3
|
||||
List Char 4 LISTNUMBER4
|
||||
List Char 5 LISTNUMBER5
|
||||
List Char 6 LISTNUMBER6
|
||||
List Num 1 LISTNUMBER1
|
||||
List Num 2 LISTNUMBER2
|
||||
List Num 3 LISTNUMBER3
|
||||
List Num 4 LISTNUMBER4
|
||||
List Num 5 LISTNUMBER5
|
||||
List Num 6 LISTNUMBER6
|
||||
List Cont 1 LISTCONTINUE1
|
||||
List Cont 2 LISTCONTINUE2
|
||||
List Cont 3 LISTCONTINUE3
|
||||
List Cont 4 LISTCONTINUE4
|
||||
List Cont 5 LISTCONTINUE5
|
||||
List Cont 6 LISTCONTINUE6
|
||||
List Hang 1 LISTMARK1
|
||||
List Hang 2 LISTMARK2
|
||||
List Hang 3 LISTMARK3
|
||||
List Hang 4 LISTMARK4
|
||||
List Hang 5 LISTMARK5
|
||||
List Hang 6 LISTMARK6
|
||||
Message BODY
|
||||
Page Number BODY
|
||||
Paragraph BODY
|
||||
Preformatted PROGRAM
|
||||
Requirement BODY
|
||||
Subheading UHEADING4
|
||||
Table Cell (Center) CELLBODY
|
||||
Table Cell (Decimal) CELLBODY
|
||||
Table Cell (Left) CELLBODY
|
||||
Table Cell (Right) CELLBODY
|
||||
Table Cell Bullet 1 CELLBODY
|
||||
Table Cell Bullet 2 CELLBODY
|
||||
Table Cell Char 1 CELLBODY
|
||||
Table Cell Char 2 CELLBODY
|
||||
Table Cell Cont 1 CELLBODY
|
||||
Table Cell Cont 2 CELLBODY
|
||||
Table Cell Num 1 CELLBODY
|
||||
Table Cell Num 2 CELLBODY
|
||||
Table Heading (Center) CELLHEADING
|
||||
Table Heading (Left) CELLHEADING
|
||||
Table Heading (Right) CELLHEADING
|
||||
Table Title BODY
|
||||
Table TitleLOT BODY
|
||||
Table Title (Appendix) BODY
|
||||
Title LOCALTITLE
|
||||
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
+4
@@ -0,0 +1,4 @@
|
||||
Open releaseNotes1_7.doc
|
||||
SaveAs ma releaseNotes1_7.doc html/releaseNotes1_7.mif
|
||||
Open releaseNotes1_7TITLE.doc
|
||||
SaveAs ma releaseNotes1_7TITLE.doc html/releaseNotes1_7TITLE.mif
|
||||
Executable
+555
@@ -0,0 +1,555 @@
|
||||
<! This document generated using mif2html Version 1.0 - Walt Akers - 1996 !>
|
||||
<head>
|
||||
<title>CDEV Documentation</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#E0E0FF">
|
||||
|
||||
<body>
|
||||
<! *************************** TABLE OF CONTENTS ****************************!>
|
||||
<! **************************** LIST OF FIGURES *****************************!>
|
||||
<! ************************ FILE : ./TestPlan_1.5.mif *****************************!>
|
||||
<br><hr><br>
|
||||
<table width=100%>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
<strong>NOTE:</strong> Information addressing the appropriate content of each of the following sections can be found
|
||||
in Section 2.0 of the Test Plan Instructions.
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<br><hr><br>
|
||||
<table width=100%>
|
||||
<tr><td valign=top>
|
||||
<!*** Start .Title: ***!><font size=+3 color=Black><strong>
|
||||
Test Plan Title:
|
||||
<!*** Finish .Title: ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start .Title: ***!><font size=+3 color=Black><strong>
|
||||
CDEV 1.5 Release Test
|
||||
<!*** Finish .Title: ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<br><hr><br>
|
||||
<table width=100%>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start .Author: ***!><font size=+2 color=Black>
|
||||
Author(s):
|
||||
Walt Akers
|
||||
<!*** Finish .Author: ***!></p></font>
|
||||
<!*** Start .Date Submitted: ***!><font size=+2 color=Black>
|
||||
Date Submitted:
|
||||
Dec 10, 1996
|
||||
<!*** Finish .Date Submitted: ***!></p></font>
|
||||
<table>
|
||||
<tr><td valign=top>
|
||||
<!*** Start .Revision Number: ***!><font size=+2 color=Black>
|
||||
Revision Number:
|
||||
<!*** Finish .Revision Number: ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start .Revision Number: ***!><font size=+2 color=Black>
|
||||
Rev. 1, Dec 10, 1996
|
||||
<!*** Finish .Revision Number: ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Brief Purpose of Test</strong><font size=+2 color=Black><strong><font size=+3 color=PANTONE 185 CVC>
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
This test will ensure the proper operation of the Control Device Interface (CDEV)
|
||||
Version 1.5.
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Anticipated Benefits
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
The new version of CDEV will introduce Collection Devices into the API and will
|
||||
correct several deficiencies that were identified in earlier versions of the class
|
||||
library.
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Beam Conditions Required
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
Complete all of the following tables, entering a value or an <strong>X</strong> in the appropriate spaces:
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Beam Type/Current (enter value)
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Beam Type/Current (enter value)
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Beam Type
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Beam Current
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Beam Off
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Beam Energy (select one)
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Beam Energy (select one)
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Beam Termination Point (select one)
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Beam Termination Point (select one)
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Type of Test (select one)
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
Type of Test (select one)
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ***!>
|
||||
|
||||
<!*** Finish ***!><br></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Time Required
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
30 Minutes
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Preferred Time of Test
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
Daylight
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Staff Required to Execute the Test <font size=+1>(including contact info)<font size=+3>
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
Walt Akers - ext. 7669
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Controlled Access Requirements
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
None
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Hardware and/or Software Changes Required
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
<strong>NOTE:</strong> If software changes are part of the test plan, include the name of the application, the old
|
||||
revision level, the new revision level, and if applicable, whether or not it is possible to roll back to the
|
||||
old revision level (are there hardware limitations, etc.).
|
||||
</p>
|
||||
No existing software will be modified. A new version of CDEV will be added.
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Setup Procedure
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
1.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
Install and compile the CDEV libraries in /usr/csite2/cdev/1.5
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
2.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
Unarchive and compile ACE Version 4.0.32
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
3.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
Compile and link the CDEV Generic Server Engine
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Test Procedure
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
1.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
Execute /usr/csite2/cdev/1.5/test/cdevDataTest Application to ensure that the
|
||||
data components of the library are functioning properly.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
2.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
Execute /usr/csite2/cdev/1.5/test/collectionTest Application to ensure that
|
||||
CDEV collection devices are functioning properly (this requires the local
|
||||
test.ddl to be the CDEVDDL file.)
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
3.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
Execute /usr/csite2/cdev/1.5/extensions/cdevGenericServer/bin/hpux-09.XX/
|
||||
NameServer, TestServer and TestProgram to ensure that the CDEV Generic
|
||||
Server Engine and communications portions of CDEV are functioning cor
|
||||
rectly.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Backout Procedure
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
1.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROCEDURE STEPS ***!><font size=+2 color=Black>
|
||||
Because the version of CDEV that is in use is a selectable value, the installation
|
||||
and operation of Version 1.5 of CDEV is of no impact unless it is specifically
|
||||
chosen. Therefore, no backout procedures are specified.
|
||||
<!*** Finish PROCEDURE STEPS ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start /Section Heads (w/ bar) ***!><font size=+3 color=PANTONE 185 CVC><strong>
|
||||
Test Results
|
||||
<!*** Finish /Section Heads (w/ bar) ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY TEXT ***!><font size=+2 color=Black>
|
||||
The test was conducted for two version of the operating system, therefore, the
|
||||
results will be presented separately:
|
||||
</p>
|
||||
HPUX 09.XX:
|
||||
</p>
|
||||
<strong>cdevDataTest Program:</strong> Pass on all 18 Sub-Tests
|
||||
</p>
|
||||
<strong>cdevDataEqualTest Program:</strong> Pass
|
||||
</p>
|
||||
<strong>cdevDataTagMapTest Program:</strong> Pass
|
||||
</p>
|
||||
<strong>collectionTest Program:</strong> Pass on 1000 Iterations
|
||||
</p>
|
||||
|
||||
</p>
|
||||
<strong>NameServer Program:</strong> Executed correctly
|
||||
</p>
|
||||
<strong>TestServer Program:</strong> Executed correctly for 100,000 packets.
|
||||
</p>
|
||||
<strong>TestProgram Program:</strong> Executed correclty for 100,000 packets.
|
||||
</p>
|
||||
|
||||
</p>
|
||||
HPUX 10.XX:
|
||||
</p>
|
||||
The following corrections had to be made to the system in order to get the
|
||||
10.XX machines to function properly.
|
||||
</p>
|
||||
|
||||
</p>
|
||||
Directory <em>/cs/lib</em> had to be linked to <em>/cs/op/lib.</em>
|
||||
</p>
|
||||
Directory <em>/usr/csite/cdev</em> had to be linked to directory <em>/usr/csite2/cdev</em>.
|
||||
</p>
|
||||
File <em>/cs/lib/epics3.12/hpux-10.xx/libca.sl </em>had to be made executable.
|
||||
</p>
|
||||
|
||||
</p>
|
||||
<strong>cdevDataTest Program:</strong> Pass on all 18 Sub-Tests
|
||||
</p>
|
||||
<strong>cdevDataEqualTest Program:</strong> Pass
|
||||
</p>
|
||||
<strong>cdevDataTagMapTest Program:</strong> Pass
|
||||
</p>
|
||||
<strong>collectionTest Program:</strong> Pass on 1000 Iterations
|
||||
</p>
|
||||
|
||||
</p>
|
||||
<strong>NameServer Program:</strong> Executed correctly
|
||||
</p>
|
||||
<strong>TestServer Program:</strong> Executed correctly for 215,000 packets.
|
||||
</p>
|
||||
<strong>TestProgram Program:</strong> Executed correclty for 215,000 packets.
|
||||
</p>
|
||||
|
||||
<!*** Finish BODY TEXT ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 948 B |
Executable
+556
@@ -0,0 +1,556 @@
|
||||
<! This document generated using mif2html Version 1.0 - Walt Akers - 1996 !>
|
||||
<head>
|
||||
<title>CDEV Documentation</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#E0E0FF">
|
||||
|
||||
<body>
|
||||
<! ************************ FILE : cdevAdminGuideTITLE.mif *****************************!>
|
||||
<br><hr><br>
|
||||
<table width=100%>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ADDRESS ***!><font size=+12 color=Black><strong><em>
|
||||
CDEV Administrator's
|
||||
Guide
|
||||
<!*** Finish ADDRESS ***!></p></strong></em></font>
|
||||
<!*** Start ADDRESS-VERSION ***!><font size=+2 color=Black>
|
||||
Chip Watson, Jie Chen, Danjin Wu, Walt Akers
|
||||
</p>
|
||||
|
||||
</p>
|
||||
Version 1.5 December 9, 1996
|
||||
</p>
|
||||
|
||||
</p>
|
||||
TJNAF - Thomas Jefferson National Accelerator Facility
|
||||
<!*** 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="cdevAdminGuide.html#TOCREF1">Directory Structure of the CDEV Distribution</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="cdevAdminGuide.html#TOCREF2">Directory Structure</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="cdevAdminGuide.html#TOCREF3">Installing and Building the CDEV Libraries</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="cdevAdminGuide.html#TOCREF4">How to Start</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="cdevAdminGuide.html#TOCREF5">Configuring Static Services</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="cdevAdminGuide.html#TOCREF6">Setting the Local Environment</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="cdevAdminGuide.html#TOCREF7">Compiling the Distribution</a>
|
||||
<!*** Finish UHEADING2TOC ***!><br></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
<! **************************** LIST OF FIGURES *****************************!>
|
||||
<! ************************ FILE : ./cdevAdminGuide.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">
|
||||
Directory Structure of the CDEV Distribution
|
||||
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF2">
|
||||
Directory
|
||||
Structure
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<table>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
The CDEV source parent directory, it contains makefiles and
|
||||
subdirectories with the source code necessary to create the
|
||||
CDEV libraries.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/ca
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Souce code providing CDEV service support for channel
|
||||
access and EPICS.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/cdevIO
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Souce code for the cdevData object and its components.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/common
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Source code for CDEV components that are used by class
|
||||
internals.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/callback
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Source code for the cdevCallback object used with callback
|
||||
operations and monitors.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/device
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Source code for the cdevDevice and cdevRequestObject
|
||||
objects and their associated component classes.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/directory
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Source code for the cdevDirectory anc cdevSvcFinder classes.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/group
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Source code for the cdevGroup and cdevTranObj classes.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/lib
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Directory for library Makefile and temporary object files.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/namesvc
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Source code for tools used to parse the CDEV DDL file.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/system
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Source code for the cdevSystem and cdevService classes and
|
||||
their associated components.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./src/utility
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Source code for a CDEV utility application.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./include
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Header files for CDEV applications, this directory will be
|
||||
populated during the first execution of make
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./lib
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
The CDEV library parent directory, will be populated wth
|
||||
subdirectories for each target architecture.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./bin
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
The CDEV binary parent directory, will be populated wth
|
||||
subdirectories for each target architecture.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./doc
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Contains most up to date versions of the CDEV documentation.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./example
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Sample applications and services that use CDEV.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start FUNC_NAME ***!><font size=+1 color=Black><strong>
|
||||
./extensions
|
||||
<!*** Finish FUNC_NAME ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start FUNC_PROTO ***!><font size=+1 color=Black><em>
|
||||
Software extensions and services for CDEV that are being
|
||||
developed by individual developers. These services add value
|
||||
to CDEV, however, they are not required by the system.
|
||||
<!*** Finish FUNC_PROTO ***!></p></em></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="TOCREF3">
|
||||
Installing and Building the CDEV Libraries
|
||||
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF4">
|
||||
How to Start
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
The following steps should be taken in order to obtain and install CDEV at your site.
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
<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>
|
||||
<strong>Obtain a copy of the CDEV distribution. </strong>A complete copy of the CDEV
|
||||
distribution may be obtained by anonymous ftp at <strong>ftp.cebaf.gov</strong> in the directory
|
||||
<strong>pub/cdev</strong>.
|
||||
<!*** 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>
|
||||
<strong>Unarchive and install the distribution.</strong> The CDEV distribution is provided in a
|
||||
compressed and archived format. The archive may be decompressed using the
|
||||
GNU <em>gzip</em> program. The archive may then be extracted using the UNIX <em>tar</em>
|
||||
command.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF5">
|
||||
Configuring Static
|
||||
Services
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<table>
|
||||
<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>
|
||||
<strong>Configure static services (archive libraries).</strong> If you will be using the archive
|
||||
library version of CDEV, you must tell CDEV the names of the services it will be
|
||||
expected to use. This must be done before any other installation procedures.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
<!*** Start Indented ***!><font size=+1 color=Black>
|
||||
The CDEV system provides a way to configure services so that applications can
|
||||
access them by name. For example, if you have the channel access service (ca)
|
||||
and a locally developed service (xyz), you can configure CDEV to use these
|
||||
services with the following command.
|
||||
<!*** Finish Indented ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black>
|
||||
|
||||
configSvc services=ca xyz headers=/usr/local/epics/include \\
|
||||
/usr/local/cdev/src/ca /usr/local/cdev/src/xyz
|
||||
<!*** Finish PROGRAM ***!></font></pre>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Indented ***!><font size=+1 color=Black>
|
||||
|
||||
</p>
|
||||
In the above examples, <em>services</em> are the names of the CDEV services that should
|
||||
be supported, and <em>headers</em> are the directories that should be searched for the
|
||||
associated header files for these services. The <em>configSvc</em> script will generate a
|
||||
Makefile and cdevSvcConfig.cc in the<em> ./src/directory</em> directory.
|
||||
<!*** Finish Indented ***!></p></font>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF6">
|
||||
Setting the Local
|
||||
Environment
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<table>
|
||||
<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>
|
||||
<strong>Set CDEV required make variables.</strong> The following environmental variables must
|
||||
be defined prior to making the CDEV libraries.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
<!*** Start Indented ***!><font size=+1 color=Black>
|
||||
CDEV: This is the root directory of the CDEV distribution.
|
||||
</p>
|
||||
|
||||
</p>
|
||||
CDEVDDL: This is the location of the CDEV Device Definition
|
||||
Language file.
|
||||
</p>
|
||||
|
||||
</p>
|
||||
CDEVSHOBJ: This is the directory where the CDEV shared
|
||||
libraries and shared objects will be stored.
|
||||
</p>
|
||||
|
||||
</p>
|
||||
CDEVINCLUDE: This is the directory whewre the CDEV header files
|
||||
are located.
|
||||
</p>
|
||||
|
||||
</p>
|
||||
<strong>SHOBJ</strong>:<strong> </strong>This variable indicates that a sharable object library
|
||||
should be compiled. In order to generate a
|
||||
sharable library, <em>SHOBJ="YES" </em>should be
|
||||
specified. This variable is undefined by default.
|
||||
<!*** Finish Indented ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF7">
|
||||
Compiling the
|
||||
Distribution
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<table>
|
||||
<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 the CDEV distribution ./src directory. This is where the
|
||||
Makefile and Makefile.common will be located.
|
||||
<!*** 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>
|
||||
If you have compiled the CDEV distribution for another TARGET in the past, you
|
||||
should execute a 'make clean' to remove any outdated object files.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+1 color=Black>
|
||||
7.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+1 color=Black>
|
||||
If you want to change default time-out value and connection retry frequency in
|
||||
channel access or EPICS, you should change DEFAULT_TIMEOUT and
|
||||
DEFAULT_CONN_FREQUENCY values in the caRequestObject.h.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+1 color=Black>
|
||||
8.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+1 color=Black>
|
||||
To begin compilation type the command 'make all' or 'make'. This will compile all
|
||||
libraries and utility applications and place them in the appropriate TARGET
|
||||
directories.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+1 color=Black>
|
||||
9.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+1 color=Black>
|
||||
To remove objects after making archive libraries, type 'make cleanObjs'. This is
|
||||
useful to make the archive libraries and then make the shared libraries.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
Executable
+699
@@ -0,0 +1,699 @@
|
||||
<! This document generated using mif2html Version 1.0 - Walt Akers - 1996 !>
|
||||
<head>
|
||||
<title>CDEV Documentation</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#E0E0FF">
|
||||
|
||||
<body>
|
||||
<! ************************ FILE : cdevCbindingTITLE.mif *****************************!>
|
||||
<br><hr><br>
|
||||
<table width=100%>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start ADDRESS ***!><font size=+12 color=Black><strong><em>
|
||||
CDEV C Binding Guide
|
||||
<!*** Finish ADDRESS ***!></p></strong></em></font>
|
||||
<!*** Start ADDRESS-VERSION ***!><font size=+2 color=Black>
|
||||
|
||||
</p>
|
||||
Chip Watson, Jie Chen, Danjin Wu, Walt Akers
|
||||
</p>
|
||||
|
||||
</p>
|
||||
Version 1.4 October 24, 1996
|
||||
</p>
|
||||
|
||||
</p>
|
||||
TJNAF - Thomas Jefferson National Accelerator Facility
|
||||
</p>
|
||||
|
||||
<!*** Finish ADDRESS-VERSION ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<! *************************** TABLE OF CONTENTS ****************************!>
|
||||
<! **************************** LIST OF FIGURES *****************************!>
|
||||
<! ************************ FILE : ./cdevCbinding.mif *****************************!>
|
||||
<br><hr><br>
|
||||
<table width=100%>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top align=center>
|
||||
<!*** Start Title ***!><font size=+5 color=Black><strong>
|
||||
cdev C Binding
|
||||
<!*** Finish Title ***!></p></strong></font>
|
||||
<!*** Start Centered ***!><font size=+2 color=Black>
|
||||
Updated:
|
||||
</p>
|
||||
|
||||
<!*** Finish Centered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
This working document describes a C binding to the cdev control system interface (see the cdev
|
||||
Design Document, and the cdev User's Guide).
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<!*** Start Heading1 ***!><font size=+3 color=Black><strong>
|
||||
Design Choices:
|
||||
<!*** Finish Heading1 ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered1 ***!><font size=+2 color=Black>
|
||||
1.
|
||||
<!*** Finish Numbered1 ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered1 ***!><font size=+2 color=Black>
|
||||
All C routine names begin with "cdev" (common device).
|
||||
<!*** Finish Numbered1 ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
2.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
Most C routines return completion status; 0==success (allows enumerated errors). A few
|
||||
return integer values (prefixed in this document with "int").
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
3.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
All data passed through the interface will be in the form of integers, strings or a self describing
|
||||
structure. Library calls will be provided to manipulate this structure.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Heading1 ***!><font size=+3 color=Black><strong>
|
||||
Comparison with C++ binding:
|
||||
<!*** Finish Heading1 ***!></p></strong></font>
|
||||
<table>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered1 ***!><font size=+2 color=Black>
|
||||
1.
|
||||
<!*** Finish Numbered1 ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered1 ***!><font size=+2 color=Black>
|
||||
cdevData, cdevRequestObject, and cdevGroup objects will be accessed through object id's.
|
||||
<!*** Finish Numbered1 ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
2.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
cdevDevice will only be referenced by device name.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
3.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
Only a single, default, cdevSystem will be supported.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
4.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
Since no function overloading is available, I/O operations on a cdevData object will have to
|
||||
pass a datatype argument, similar to EPICS channel access.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
5.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
Routines which return strings will malloc the string, and the caller must free it.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
6.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
Function names are generally constructed from the class name followed by the method name,
|
||||
e.g. cdevGroupStart.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
7.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
Creating objects will be done by routines like cdevGroupAllocate, which will essentially
|
||||
return a pointer to the created object.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
8.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
cdevSystem methods will drop "System" from the name, and the notion of "system" will be
|
||||
invisible.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
9.
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Numbered ***!><font size=+2 color=Black>
|
||||
cdevDevice methods will drop "Device". cdevRequestObject methods will use the shorter
|
||||
"cdevRequest".
|
||||
<!*** Finish Numbered ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top align=center>
|
||||
<!*** Start Title ***!><font size=+5 color=Black><strong>
|
||||
C Binding User's Guide
|
||||
<!*** Finish Title ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Heading1 ***!><font size=+3 color=Black><strong>
|
||||
Simple message passing routines:
|
||||
<!*** Finish Heading1 ***!></p></strong></font>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Devices are addressed by name, and operations are performed by sending a message string and an
|
||||
additional optional data object identifier. This data object is self describing in the sense that it con
|
||||
tains indicators of the data type (int, float, etc.) and size (array lengths). Data returned from the
|
||||
control system will also be through a data object.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
status = cdevSend (char* devName, char* message,
|
||||
</p>
|
||||
cdev_data_t out, cdev_data_t in);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
The data objects act as small databases able to hold multiple tagged data items. Items are inserted
|
||||
into or extracted from the database via access routines. These access routines are also responsible
|
||||
for any necessary data type conversions. Tags are passed to the cdevData routines as integers, and
|
||||
are looked up in the tag database by specifying an ascii tag name. The most common tags are
|
||||
"value", "timeStamp", "status", and "severity".
|
||||
</p>
|
||||
Data object manipulation routines:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
cdevDataAllocate (cdev_data_t* id);
|
||||
</p>
|
||||
cdevDataFree (cdev_data_t id);
|
||||
</p>
|
||||
cdevDataTagC2I (char* tag, int *tagid);
|
||||
</p>
|
||||
cdevDataTagI2C (int tagid, char** tag); /* caller must free string */
|
||||
</p>
|
||||
cdevDataInsertTag (int tag, char* ctag);
|
||||
</p>
|
||||
cdevDataInsert (cdev_data_t id, int tagid, int type, void * data);
|
||||
</p>
|
||||
int cdevDataInsertArray(cdev_data_t id, int tagid, int type, void *data, size_t len, size_t
|
||||
ndim);
|
||||
</p>
|
||||
cdevDataGet (cdev_data_t id, int tagid, int type, void * data);
|
||||
</p>
|
||||
cdevDataFind (cdev_data_t id, int tagid, void ** data);
|
||||
</p>
|
||||
int cdevDataGetType (cdev_data_t id, int tagid);
|
||||
</p>
|
||||
int cdevDataGetDim (cdev_data_t id, int tagid);
|
||||
</p>
|
||||
int cdevDataGetElems (cdev_data_t id, int tagid);
|
||||
</p>
|
||||
cdevDataGetBounds (cdev_data_t id, int tagid, int *bounds, int bsize);
|
||||
</p>
|
||||
cdevDataSetBounds (cdev_data_t id, int tagid, int *bounds, int bsize);
|
||||
</p>
|
||||
void cdevDataRemoveAll(cdev_data_t id);
|
||||
</p>
|
||||
cdevDataRemove (cdev_data_t id, int tagid);
|
||||
</p>
|
||||
cdevDataChangeTag (cdev_data_t id, int tagid, int newtagid);
|
||||
</p>
|
||||
cdevDataAsciiDump (cdev_data_t id, FILE *fp);
|
||||
</p>
|
||||
void cdevDataCopy(cdev_data_t from, cdev_data_t *to);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
For example, to read the current from a magnet named NLQ1:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Indented ***!><font size=+2 color=Black>
|
||||
cdev_data_t result;
|
||||
</p>
|
||||
float current;
|
||||
</p>
|
||||
int status, valtag;
|
||||
</p>
|
||||
status = cdevDataAllocate (&result);
|
||||
</p>
|
||||
status = cdevDataTagC2I ("value",&valtag);
|
||||
</p>
|
||||
status = cdevSend("NLQ1","read current",NULL,result);
|
||||
</p>
|
||||
status = cdevDataGet(result, valtag, CDEV_FLOAT, current);
|
||||
<!*** Finish Indented ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
The first call to a device automatically connects to the requested service, initializing any underly
|
||||
ing packages as needed. These routines are synchronous (operation completes before return);
|
||||
asynchronous routines are discussed below.
|
||||
</p>
|
||||
The message (second) argument selects what operation and attribute to access. Many messages
|
||||
are by convention of the form "verb attribute", and typical verbs include get, set, monitorOn, and
|
||||
monitorOff.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<!*** Start Heading1 ***!><font size=+3 color=Black><strong>
|
||||
Binding a device and message
|
||||
<!*** Finish Heading1 ***!></p></strong></font>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
In order to avoid the overhead of parsing the device name and message on each call, it is possible
|
||||
to get a handle which binds the device and message into a request.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
status = cdevRequestAllocate(char* device, char*message, CDEVREQUESTID* reqid);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Operations may be performed on this request object without specifying device and message.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
status = cdevRequestSend(reqid, out, result);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Request objects maintain a connection to a server, and the state of this connection may be
|
||||
obtained:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
state = cdevRequestState (reqid);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
The current access rights (read, write, none) for this request object may be obtained:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
access = cdevRequestAccess (reqid);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Given the request object, it is also possible to extract the device name and message:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
cdevRequestDevice (reqid, char** name); /* caller must free string */
|
||||
</p>
|
||||
cdevRequestMessage (reqid, char** msg);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Heading1 ***!><font size=+3 color=Black><strong>
|
||||
Monitoring and Asynchronous I/O
|
||||
<!*** Finish Heading1 ***!></p></strong></font>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
A message sent to a device may result in an asynchronous reply, or more than one reply. In addi
|
||||
tion, abnormal conditions may occur in the device which are of interest to the application. Each of
|
||||
these results in a message back to the client which is asynchronous with respect to program exe
|
||||
cution. Several calls are provided to deal with asynchronous data.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td valign=top>
|
||||
<!*** Start HeadingRunIn ***!><font size=+2 color=Black><strong>
|
||||
Asynchronous Messages
|
||||
<!*** Finish HeadingRunIn ***!></p></strong></font>
|
||||
</td>
|
||||
<td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
An asynchronous version of the message send call will send the mes
|
||||
sage, but not wait for the reply. Two async forms are supported: one returning data to a caller's
|
||||
data object, and the other returning data to a callback function. The reply argument is replaced by
|
||||
an additional structure which specified a user callback function.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
status = cdevSendNoBlock(char* device, char* message,
|
||||
</p>
|
||||
cdev_data_t out, cdev_data_t result);
|
||||
</p>
|
||||
status = cdevSendCallback(char* device, char* message,
|
||||
</p>
|
||||
cdev_data_t out, CDEVCALLBACK* callback);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Similarly for request objects:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
status = cdevRequestSendNoBlock(cdev_data_t out, cdev_data_t result);
|
||||
</p>
|
||||
status = cdevRequestSendCallback(cdev_data_t out, CDEVCALLBACK* callback);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start HeadingRunIn ***!><font size=+2 color=Black><strong>
|
||||
Monitoring:
|
||||
<!*** Finish HeadingRunIn ***!></p></strong></font>
|
||||
</td>
|
||||
<td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Monitoring is started and stopped by two using the message "monitorOn xxx" and
|
||||
"monitorOff xxx".
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Indented ***!><font size=+2 color=Black>
|
||||
status = cdevSendCallback("deviceName", "monitorOn attributeName",NULL, callback);
|
||||
<!*** Finish Indented ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start HeadingRunIn ***!><font size=+2 color=Black><strong>
|
||||
Synchronization
|
||||
<!*** Finish HeadingRunIn ***!></p></strong></font>
|
||||
</td>
|
||||
<td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
In order to synchronize with asynchronous messages, both a poll and a pend
|
||||
call are available, as well as an explicit flush. A pend with 0.0 seconds waits forever.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
cdevFlush ();
|
||||
</p>
|
||||
cdevPoll ();
|
||||
</p>
|
||||
cdevPend (float seconds);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
If seconds==0.0, wait forever.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td valign=top>
|
||||
<!*** Start HeadingRunIn ***!><font size=+2 color=Black><strong>
|
||||
Grouping
|
||||
<!*** Finish HeadingRunIn ***!></p></strong></font>
|
||||
</td>
|
||||
<td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Grouping of operations will be similar to that specified for EZCA, with slight varia
|
||||
tions. The grouping calls are useful for synchronizing with a set of asynchronous calls.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
cdevGroupAllocate(GROUPID* groupid);
|
||||
</p>
|
||||
cdevGroupStart(groupid);
|
||||
</p>
|
||||
cdevGroupEnd(groupid);
|
||||
</p>
|
||||
cdevGroupPoll(groupid);
|
||||
</p>
|
||||
cdevGroupPend(groupid);
|
||||
</p>
|
||||
cdevGroupAllFinished (groupid);
|
||||
</p>
|
||||
cdevGroupStatus (groupid, int *status, int *nstatus); /* initially nstatus = len of status */
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start HeadingRunIn ***!><font size=+2 color=Black><strong>
|
||||
File Descriptors
|
||||
<!*** Finish HeadingRunIn ***!></p></strong></font>
|
||||
</td>
|
||||
<td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
To integrate other asynchronous systems, such as X windows, it is often neces
|
||||
sary to obtain file descriptors for select operations.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
status = cdevGetFD(int fd[], int * numFD);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start HeadingRunIn ***!><font size=+2 color=Black><strong>
|
||||
Context
|
||||
<!*** Finish HeadingRunIn ***!></p></strong></font>
|
||||
</td>
|
||||
<td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Operations on a device take place within a context. The context is maintained by the
|
||||
device as a cdev_data_t structure. The following routines are used to get and set the context; set
|
||||
ting items within the context is done by the cdevData* routines.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
cdevGetContext(char *devname, cdev_data_t *id);
|
||||
</p>
|
||||
cdevSetContext(char *devname, cdev_data_t id);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start HeadingRunIn ***!><font size=+2 color=Black><strong>
|
||||
Private Data
|
||||
<!*** Finish HeadingRunIn ***!></p></strong></font>
|
||||
</td>
|
||||
<td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Each device also maintains a private data pointer, to be used by the application
|
||||
developer for any purpose desired.
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
cdevGetPrivate (char *devname, void **data);
|
||||
</p>
|
||||
cdevSetPrivate (char *devname, void *data);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
These same four routines are available for request objects:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
cdevRequestGetContext (reqid, cdev_data_t *id);
|
||||
</p>
|
||||
cdevRequestSetContext (reqid, cdev_data_t id);
|
||||
</p>
|
||||
cdevRequestGetPrivate (reqid, void **data);
|
||||
</p>
|
||||
cdevRequestSetPrivate (reqid, void *data);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Heading1 ***!><font size=+3 color=Black><strong>
|
||||
Error Reporting and Handling
|
||||
<!*** Finish Heading1 ***!></p></strong></font>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
This group of routines is also modeled after EZCA (assume identical functionality).
|
||||
</p>
|
||||
Turn automatic error reporting on and off:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
cdevAutoErrorOn ();
|
||||
</p>
|
||||
cdevAutoErrorOff ();
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Set the severity threshold at which errors should be reported:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start IndentedBold ***!><font size=+2 color=Black><strong>
|
||||
cdevSetThreshold (int new);
|
||||
</p>
|
||||
cdevReportError (int severity, char *name,
|
||||
</p>
|
||||
CDEVREQUESTID request, char* format, ...);
|
||||
</p>
|
||||
cdevGetErrorString ();
|
||||
</p>
|
||||
cdevSetErrorHandler (function);
|
||||
<!*** Finish IndentedBold ***!></p></strong></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
Note: For simplicity of use, a very compact set of error codes is implemented in cdev. The follow
|
||||
ing error codes are defined in the header file cdevErrCode.h.
|
||||
</p>
|
||||
CDEV_SUCCESS = 0 Success
|
||||
</p>
|
||||
CDEV_INVALIDOBJ = 1 Invalid cdev object used
|
||||
</p>
|
||||
CDEV_INVALIDARG = 2 Invalid argument passed to cdev method
|
||||
</p>
|
||||
CDEV_INVALIDSVC = 3 Wrong service during dynamic loading
|
||||
</p>
|
||||
CDEV_NOTCONNECTED = 4 Not connected to low-level network service
|
||||
</p>
|
||||
CDEV_IOFAILED = 5 Low-level network service IO failed
|
||||
</p>
|
||||
CDEV_CONFLICT = 6 Conflicting of data types or data tags
|
||||
</p>
|
||||
CDEV_NOTFOUND = 7 Cdev cannot find specified data or tag
|
||||
</p>
|
||||
CDEV_TIMEOUT = 8 Time out
|
||||
</p>
|
||||
CDEV_CONVERT = 9 cdevData conversion error
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<!*** Start Heading1 ***!><font size=+3 color=Black><strong>
|
||||
Name Services
|
||||
<!*** Finish Heading1 ***!></p></strong></font>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
There is a special device named cdevDirectory which provides a set of query capabilities:
|
||||
<!*** Finish Body ***!></p></font>
|
||||
<table>
|
||||
<tr><td width=5% valign=top>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start Indented ***!><font size=+2 color=Black>
|
||||
status = cdevSend("cdevDirectory", "query",
|
||||
</p>
|
||||
cdev_data_t selection, cdev_data_t result);
|
||||
<!*** Finish Indented ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<!*** Start Body ***!><font size=+2 color=Black>
|
||||
The selection data object specifies one or more tags used to select device names. The result con
|
||||
tains a list of devices accessed through the "value" tag.
|
||||
</p>
|
||||
|
||||
<!*** Finish Body ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
Executable
+4336
File diff suppressed because it is too large
Load Diff
Executable
+864
@@ -0,0 +1,864 @@
|
||||
<! 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>
|
||||
Executable
+1968
File diff suppressed because it is too large
Load Diff
Executable
+8150
File diff suppressed because it is too large
Load Diff
Executable
+949
@@ -0,0 +1,949 @@
|
||||
<! This document generated using mif2html Version 1.0 - Walt Akers - 1996 !>
|
||||
<head>
|
||||
<title>CDEV Documentation</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#E0E0FF">
|
||||
|
||||
<body>
|
||||
<! ************************ FILE : cdevScriptServiceTITLE.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 Script Service
|
||||
<!*** Finish ADDRESS-TITLE ***!></p></strong></em></font>
|
||||
<!*** Start ADDRESS-VERSION ***!><font size=+1 color=Black>
|
||||
|
||||
</p>
|
||||
A Tool for Using Interactive Scripts from CDEV
|
||||
</p>
|
||||
|
||||
</p>
|
||||
Walt Akers
|
||||
</p>
|
||||
|
||||
</p>
|
||||
Version 1.0 - February 11, 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="cdevScriptService.html#TOCREF1">Script Service 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="cdevScriptService.html#TOCREF2">Overview of the Script Service</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="cdevScriptService.html#TOCREF3">Features of the Script 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="cdevScriptService.html#TOCREF4">Building the Script 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="cdevScriptService.html#TOCREF5">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="cdevScriptService.html#TOCREF6">Steps to Building 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="cdevScriptService.html#TOCREF7">Structure of Data Provided to the Script</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="cdevScriptService.html#TOCREF8">General Form of Data String</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="cdevScriptService.html#TOCREF9">Representation of Scalar Data</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="cdevScriptService.html#TOCREF10">Representation of Array Data</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="cdevScriptService.html#TOCREF11">Structure of Data Returned from the Script</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="cdevScriptService.html#TOCREF12">Returning Data to the Calling CDEV Application</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="cdevScriptService.html#TOCREF13">General Form of String Data </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="cdevScriptService.html#TOCREF14">Returning a Single Result Packet </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="cdevScriptService.html#TOCREF15">Returning Multiple Result Packets </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="cdevScriptService.html#TOCREF16">Special Considerations</a>
|
||||
<!*** Finish UHEADING2TOC ***!><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="cdevScriptService.html#TOCREF17">DDL Entries for the Script 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="cdevScriptService.html#TOCREF18">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="cdevScriptService.html#LOFREF1">General form of string representation of cdevData</a>
|
||||
<!*** Finish FIGURELOF ***!><br></font>
|
||||
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
||||
Figure 2:
|
||||
<a href="cdevScriptService.html#LOFREF2">String representation of scalar data in a cdevData object</a>
|
||||
<!*** Finish FIGURELOF ***!><br></font>
|
||||
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
||||
Figure 3:
|
||||
<a href="cdevScriptService.html#LOFREF3">String representation of array data</a>
|
||||
<!*** Finish FIGURELOF ***!><br></font>
|
||||
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
||||
Figure 4:
|
||||
<a href="cdevScriptService.html#LOFREF4">Returning a single result packet to the CDEV application</a>
|
||||
<!*** Finish FIGURELOF ***!><br></font>
|
||||
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
||||
Figure 5:
|
||||
<a href="cdevScriptService.html#LOFREF5">Returning a multiple result packets to the CDEV application</a>
|
||||
<!*** Finish FIGURELOF ***!><br></font>
|
||||
<!*** Start FIGURELOF ***!><font size=+1 color=Black>
|
||||
Figure 6:
|
||||
<a href="cdevScriptService.html#LOFREF6">Simple DDL file for the Script Service</a>
|
||||
<!*** Finish FIGURELOF ***!><br></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
<! ************************ FILE : ./cdevScriptService.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">
|
||||
Script Service 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
|
||||
Script Service
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
The CDEV Script Service is designed to allow a a CDEV application to execute an
|
||||
external script to process a message. The output that is produced by the executable
|
||||
will be returned to the caller in the form of a cdevData. The CDEV Script Service
|
||||
meets the following requirements.
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF3">
|
||||
Features of the
|
||||
Script 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 filename of the script is associated with a CDEV device/message
|
||||
combination by using the "filename" 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>
|
||||
A new process will be spawned for the script each time it is executed. Its standard
|
||||
output (stdout) file descriptor will be redirected to return data to the main CDEV
|
||||
application, allowing the script to return results to the parent process.
|
||||
<!*** 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 external executable file can be any form of user shell, batch file or binary
|
||||
application that is supported on the host platform.
|
||||
<!*** 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 Script Service supports all of CDEV's send mechanisms; "send",
|
||||
"sendNoBlock" and "sendCallback". Because of limits imposed on the number of
|
||||
active processes, the user is advised to use the synchronous "send" method
|
||||
whenever practical.
|
||||
<!*** 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>
|
||||
When called by CDEV, the script will receive three arguments; the name of the
|
||||
CDEV device associated with the request, the message string that was submitted
|
||||
to the device, and a string that describes the contents of the outbound cdevData
|
||||
object.
|
||||
<!*** 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 reply that is written to the standard output by the script must have a specific
|
||||
format as described later in this document. A script may return more than one
|
||||
reply packet to the caller.
|
||||
<!*** 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 script notifies CDEV that it has written its last reply packet by writing "done"
|
||||
alone on a line to the standard output.
|
||||
<!*** 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>
|
||||
If the script is to return multiple results, it should write "end" alone on a line to the
|
||||
standard output between each packet, and write "done" alone on a line following
|
||||
the last packet.
|
||||
<!*** 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>
|
||||
If the script returns a value in the "status" tag of its reply packet, this will be
|
||||
provided to the caller as the completion code of the message. Traditionally a
|
||||
status of 0 indicates success, and all other values indicated an error occurred.
|
||||
<!*** 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>
|
||||
Because the callback mechanism of the Script Service is triggered by output from
|
||||
the script, the script developer should at least write "done" to the standard output
|
||||
even if the application returns no output.
|
||||
<!*** 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="TOCREF4">
|
||||
Building the Script Service
|
||||
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF5">
|
||||
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 Script Service is provided with the CDEV distribution starting
|
||||
with version 1.5. The source code is located in the directory $CDEV/extensions/
|
||||
ScriptService. The following steps should be taken to build the ScriptService.
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF6">
|
||||
Steps to Building
|
||||
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>
|
||||
Change directories to <em>$CDEV/extensions/ScriptService/src</em>.
|
||||
<!*** 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.
|
||||
<!*** 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>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>
|
||||
Type make to compile and link the Script Service shared object. 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 Script Service
|
||||
and will install it into your CDEVSHOBJ directory. At this point you are ready to use
|
||||
the Script Service.
|
||||
<!*** 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="TOCREF7">
|
||||
Structure of Data Provided to the Script
|
||||
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF8">
|
||||
General Form of
|
||||
Data String
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
When a developer makes a CDEV send call, he may provide outbound data in the
|
||||
form of a cdevData object. Before calling the script, this data is converted into a string
|
||||
and provided as the third argument to the application (the first argument is the device
|
||||
name and the second is the message). The structure of the outbound data string is of
|
||||
the following form.
|
||||
</p>
|
||||
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
||||
Figure 1:
|
||||
<a name="LOFREF1">
|
||||
General form of string representation of cdevData
|
||||
<table border=1><tr><td>
|
||||
<table>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
||||
tag1="string value"
|
||||
tag2=1.00
|
||||
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
||||
</td></tr>
|
||||
</table>
|
||||
</tr></td></table>
|
||||
<AFrame 13>
|
||||
</a> <!*** Finish FIGURE ***!></p></em></font>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF9">
|
||||
Representation of
|
||||
Scalar Data
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
The above example shows two data entries of the form <em>tag=value</em>. Each entry is
|
||||
separated by a carriage return. The first entry has a tag name of <em>'tag1'</em> and a value of
|
||||
<em>'string value'</em>. You will note that <em>'string value'</em> is enclosed in double quotes in the
|
||||
example. This is used to notify the script that the value is a non-numeric character
|
||||
string. In the second data entry the value <em>'1.0' </em>is not enclosed in quotes, indicating that
|
||||
the value is a number.
|
||||
</p>
|
||||
The following example illustrates how scalar values stored in a cdevData object would
|
||||
look when they are passed to the script.
|
||||
</p>
|
||||
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
||||
Figure 2:
|
||||
<a name="LOFREF2">
|
||||
String representation of scalar data in a cdevData object
|
||||
<table border=1><tr><td>
|
||||
<table>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
||||
Data stored in cdevData object:
|
||||
Tag: value
|
||||
Data Type: character string
|
||||
Value: Test
|
||||
|
||||
Tag: status
|
||||
Data Type: integer
|
||||
Value: 0
|
||||
|
||||
Tag: controlHigh
|
||||
Data Type: double
|
||||
Value: 1.001
|
||||
|
||||
String representation provided to script:
|
||||
value="Test"\\n
|
||||
status=0\\n
|
||||
controlHigh=1.001\\n
|
||||
<!*** 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>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF10">
|
||||
Representation of
|
||||
Array Data
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
If array data is stored in the outbound cdevData object, it too can be provided to the
|
||||
script. The data is structured in the standard C format where opening and closing
|
||||
braces mark the beginning and end (respectively) of each array bound. The following
|
||||
example illustrates how various arrays would be represented as strings.
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
||||
Figure 3:
|
||||
<a name="LOFREF3">
|
||||
String representation of array data
|
||||
<table border=1><tr><td>
|
||||
<table>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
||||
Data stored in cdevData object:
|
||||
Tag: value
|
||||
Data Type: character string [3]
|
||||
Value: "value1" "value2" "value3"
|
||||
|
||||
String representation provided to script:
|
||||
value={"value1","value2","value3"}\\n
|
||||
|
||||
<AFrame 5>
|
||||
|
||||
Data stored in cdevData object:
|
||||
Tag: value
|
||||
Data Type: double [3]
|
||||
Value: 1.0, 2.0, 3.01
|
||||
|
||||
String representation provided to script:
|
||||
value={1,2,3.01}\\n
|
||||
|
||||
<AFrame 6>
|
||||
|
||||
Data stored in cdevData object:
|
||||
Tag: value
|
||||
Data Type: double [3][2]
|
||||
Value: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0
|
||||
|
||||
String representation provided to script:
|
||||
value={{1,2},{3,4},{5,6}}\\n
|
||||
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
||||
</td></tr>
|
||||
</table>
|
||||
</tr></td></table>
|
||||
<AFrame 3>
|
||||
</a> <!*** Finish FIGURE ***!></p></em></font>
|
||||
</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">
|
||||
Structure of Data Returned from the Script
|
||||
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF12">
|
||||
Returning Data to
|
||||
the Calling CDEV
|
||||
Application
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
Before CDEV starts the script, it creates a pipe that is used to pass data between the
|
||||
script and the CDEV application. One end of this pipe is maintained by the application
|
||||
and the other end of the pipe is provided to the script as its standard output. This
|
||||
means that anytime the script uses the "echo" command or the "printf" command, the
|
||||
data that it output's will be transmitted through the pipe to the parent application.
|
||||
</p>
|
||||
The script is responsible for formatting the data into a collection of character strings
|
||||
that can be recognized by the CDEV application.
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF13">
|
||||
General Form of
|
||||
String Data
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
In general, the data that is returned from a script is of the same form as described in
|
||||
the preceding section, "<em>Structure of Data Provided to the Script</em>". The most notable
|
||||
difference is that the script must terminate the list by providing a character string that
|
||||
indicates that the group of data items is complete; the string "<em>end</em>" or "<em>done</em>" alone on
|
||||
a line.
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF14">
|
||||
Returning a
|
||||
Single Result
|
||||
Packet
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
If the script is going to return exactly one result packet (<em>a group of tags and values that
|
||||
will be used to populate the result cdevData</em>), then it should write the string "<em>done</em>" on
|
||||
a line by itself immediately following the output data. This will notify the Script Service
|
||||
that no more data will be returned from the script.
|
||||
</p>
|
||||
The following example shows how a single result will be returned from a script. Note
|
||||
that the "status" tag contains the completion code that will be returned to the CDEV
|
||||
application.
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
||||
Figure 4:
|
||||
<a name="LOFREF4">
|
||||
Returning a single result packet to the CDEV application
|
||||
<table border=1><tr><td>
|
||||
<table>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
||||
#\\! /bin/csh -f
|
||||
|
||||
echo value=\\"Test\\"
|
||||
echo status=0
|
||||
echo controlLow=1.5
|
||||
echo controlHigh=25.1
|
||||
echo done
|
||||
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
||||
</td></tr>
|
||||
</table>
|
||||
</tr></td></table>
|
||||
<AFrame 7>
|
||||
</a> <!*** Finish FIGURE ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF15">
|
||||
Returning
|
||||
Multiple Result
|
||||
Packets
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
Returning multiple results from a single script execution is not generally advised.
|
||||
However, If the script is going to return more than one result packet, then each interim
|
||||
packet should be terminated by the "<em>end</em>" keyword on a line by itself. The "<em>done</em>"
|
||||
keyword should follow the last entry.
|
||||
</p>
|
||||
The following example shows how two results will be returned from a script.
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
||||
Figure 5:
|
||||
<a name="LOFREF5">
|
||||
Returning a multiple result packets to the CDEV application
|
||||
<table border=1><tr><td>
|
||||
<table>
|
||||
<tr><td>
|
||||
<! ***** Empty Column ***** !>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start PROGRAM ***!><pre><font size=+0 color=Black><strong><em>
|
||||
#\\! /bin/csh -f
|
||||
|
||||
echo value=\\"Start Result 1\\"
|
||||
echo status=0
|
||||
echo end
|
||||
echo value=\\"Start Result 2\\"
|
||||
echo status=-1
|
||||
echo done
|
||||
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
||||
</td></tr>
|
||||
</table>
|
||||
</tr></td></table>
|
||||
<AFrame 9>
|
||||
</a> <!*** Finish FIGURE ***!></p></em></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF16">
|
||||
Special
|
||||
Considerations
|
||||
</a> <!*** Finish UHEADING2 ***!></p></strong></font>
|
||||
</td>
|
||||
<td valign=top>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
If the script that is being executed will not return a result, then the developer should
|
||||
still write "<em>done"</em> to the standard output in order to notify the CDEV application that it
|
||||
should no longer wait for output. If the script is not returning a result, it may write the
|
||||
terminating <em>"done"</em> at the beginning of the script or at the end. Because synchronous
|
||||
calls will block until a reply is received, the developer should return a result to the
|
||||
CDEV application as quickly as possible.
|
||||
</p>
|
||||
If the developer never writes anything to the standard output, then the user specified
|
||||
CDEV callback will never be executed... therefore, it is crucial to notify the CDEV
|
||||
application when the script has completed.
|
||||
<!*** 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="TOCREF17">
|
||||
DDL Entries for the Script Service
|
||||
</a> <!*** Finish HEADING1 ***!></p></strong></font>
|
||||
</td></tr>
|
||||
<tr><td valign=top>
|
||||
<!*** Start UHEADING2 ***!><font size=+1 color=Black><strong>
|
||||
<a name="TOCREF18">
|
||||
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 Script
|
||||
Service and how to use the service data to specify the filename that the Script Service
|
||||
will execute to service a message.
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
<!*** Start FIGURE ***!><font size=+0 color=Black><em>
|
||||
Figure 6:
|
||||
<a name="LOFREF6">
|
||||
Simple DDL file for the Script 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 Script and that it will use the cdevData
|
||||
* tag 'filename' to read configuration information from the
|
||||
* DDL file entries.
|
||||
*/
|
||||
service Script
|
||||
{
|
||||
tags {filename}
|
||||
}
|
||||
|
||||
/*
|
||||
* This class definition identifies the class scriptClass which
|
||||
* supports the "get and "set" commands on attributes "attrib0"
|
||||
* and "attrib1". Note that attrib0 will call script /bin/ouch
|
||||
* and attrib1 will call script /bin/wammo.
|
||||
*/
|
||||
class scriptClass
|
||||
{
|
||||
verbs {get, set}
|
||||
attributes
|
||||
{
|
||||
attrib0 Script {filename = /bin/ouch};
|
||||
attrib1 Script {filename = /bin/wammo};
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Finally, the CDEV DDL identifies two devices that are of type
|
||||
* scriptClass. Any time one of the supported messages is passed
|
||||
* to one of these devices it will activate the corresponding
|
||||
* script.
|
||||
*/
|
||||
scriptClass : device0, device1;
|
||||
|
||||
<!*** Finish PROGRAM ***!></strong></em></font></pre>
|
||||
</td></tr>
|
||||
</table>
|
||||
</tr></td></table>
|
||||
<AFrame 11>
|
||||
</a> <!*** Finish FIGURE ***!></p></em></font>
|
||||
<!*** Start BODY ***!><font size=+1 color=Black>
|
||||
|
||||
<!*** Finish BODY ***!></p></font>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user