Code changes so far:
Added command line switches for orb and channel list filename
Renamed source file from fake_daq to orb2nsds
Removed compile script, edited makefile to work based on same
Added command line switches for channel list file, orb host
Removed extra files from the source directory
Changed hard-coded buffer sizes to malloc based on number of channels in the list file
Changed printf's to flog calls
Added some comments, debug messages, assertions
Memory management (strdup replaced by strcpy, pre-allocate unstuffed packet data array)
Added this page to docs subdirectory
Internal cleanups - formatting, structure definition, added assertions, fixes to channel list logic, etc
To do:
- Test with real orb to find segfault base cause
- Document code
Building the project
The code itself has several dependencies that compliate the build:
- flog messaging library
- nsds utils, from the nsds-driver
- Antelope itself
To resolve the first two, you need to check flog and nsds-driver out of the CVS archive
and build them:
csh:
setenv CVSROOT :pserver:anonymous@neescvs.mcs.anl.gov:/disks/cvs/neesgrid
source /opt/antelope/4.5/setup.csh
bash:
export CVSROOT=:pserver:anonymous@neescvs.mcs.anl.gov:/disks/cvs/neesgrid
. /opt/antelope/4.5/setup.sh
then
cvs co flog nsds-driver orb2nsds
cd flog
make
cd ../nsds-driver
make
cd ../orb2nsds
make
You may also need to set LD_LIBRARY_PATH to point at Antelope:
csh:
setenv LD_LIBRARY_PATH /opt/antelope/4.5/lib
bash:
export LD_LIBRARY_PATH=/opt/antelope/4.5/lib
before the build of orb2nsds will succeed.
Running the code
As with the other programs, running it with a -h argument will list the command line switches. Note, however, that
the Antelope libraries seem to co-opt the C startup routines for licensing checks. Because of this, you cannot even see non-Orb
operations like command line help without a valid Antelope license on-disk. Personally, I think this is broken on their part,
but it's a constraint we have to deal with.
Arguments:
--port, -p: TCP port we will listen on, defaults to 55055 and 55056. If you set this to N, it will also use N+1.
--orb-host, -o: Orb to connect to
--channel-list-file, -f: File containing the list of channels, in a bare format, one channel per line. An
example is included in the CVS package.
--help, -h: List the options and exit.
Current status
As of July 21 2004, it runs and feeds 109 channels into the RBNB via DaqToRbnb. I think its ready for beta testing.
Further work
Time permitting, it would be more efficient to implement a Java program that read from Orb and
wrote RBNB without the DaqToRbnb instance:
While this seems quite possible (this page lists a Java Orb
client) I don't know the difficulty in this.
Navigation links
Back to NEESGrid at Argonne
Back to home page
Support
This work was supported primarily by the George E. Brown,
Jr. Network for Earthquake Engineering Simulation (NEES) Program of
the National Science Foundation under Award Number CMS-0117853.