Main Page Data Structures File List Data Fields Globals
NSDS Driver Documentation
0.90
This software is the interface between the NEESgrid DAQ system and the streaming data server, or NSDS. As of 10/14/02, this is fairly complete - streaming data works well, reconnects are good, there's more to do but this is a decent v1.0.
It's homepage is at http://www.mcs.anl.gov/neesgrid/ That page has links to the mailing list, Bugzilla archive, CVS and so forth.
This page has the overview and some of the implmentation details; design docs are linked off of the above web page and more detail can be found in the files' documentation. There are good (I think) explanations for each function and what it does, etc. For some reason, I can't Doxygen to get the tabs right, sorry about that. Indents will look wrong because of it.
The driver is responsible for 4 TCP ports -
1) Control connection to DAQ
2) Data connection to DAQ
3) Control connection to NSDS
4) Data connection to NSDS
All of these are initiated by the driver - the NSDS and DAQ have the server ports. So there's quite a need for careful code and error handling. There's a lot of code in here to retry, reconnnect, etc.
The code in the driver and fake_daq is threaded, with a separate transient thread used to move data on the data channel ports. The data thread just moves data between DAQ and NSDS, it used to parse the data but since the intelligence got shifted into the DAQ it no longer needs to do so. There is, however, still the shared data structure used to mark subscribed channels. This is vestigal and can be removed soon.
Signal handling is crude. A single handler sets a global boolean if signalled, and the various routines test it as an exit condition. Messy.
Similarly, there's a global boolean 'streaming_active' that the data thread uses as an exit signal. Also messy, but simplest IPC.
Both driver and fake_daq have command line arguments (see the main() routines) for defining their TCP ports and addresses. In this manner, you can run multiple copies of each for the NSDS. You can also change the NSDS machine and port, as well as the 'driverid' as required by the NSDS. Parsing is done via getopt().
We need the Fermi 'flog' messaging library (also in CVS), plus the GNU toolchain bits - gcc (code should compile on others but untested), getopt.
Generated on Fri Dec 6 14:33:15 2002 for NSDS Driver by
1.2.18