NEESGrid logo

Orb2NSDS

Paul Hubbard
Argonne National Lab
hubbard@mcs.anl.gov

Revision History

1.0 July 20, 2004
1.1 July 21, 2004: Added build and run instructions

Introduction

Orb2NSDS is a DAQ program using the current protocol (PDF) that bridges an Antelope Orb into the neesgrid. Initial implementation by Balaji Vasu of UCLA based on the fake_daq code.

The system diagram looks like this:

flow diagram of orb/rbnb/drivers

When visiting UCLA, we had some problems when we tried to run this on a larger channel list, due to some hardcoded buffer sizes in the code. Balaji is now working elsewhere, so I've taken the code and tried to work out the issues.

What's been done

As of 7/20/04, I've
  • Cleaned up the code a bit (more below)
  • Put it into the NEESGrid CVS archive as project 'orb2nsds'
  • 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:

    1. Test with real orb to find segfault base cause
    2. Document code

    Building the project

    The code itself has several dependencies that compliate the build:
    1. flog messaging library
    2. nsds utils, from the nsds-driver
    3. 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:

    Flow chart w/out daq to rbnb

    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.