CRaTER -- pdist


pdist -- CRaTER packet distribution program


     pdist [-h] [-p in_port] [-P out_port_base] [-[rR] filename]
       [-s sup_port_in] [-S sup_port_out] [-v] [-z]
       [-e "appid" "appid appid"]


      -h displays this message
      -p selects port for input telemetry
      -P selects base port for first output telemetry stream
      -r selects file to read for data stream input w/o flow control
      -R selects file to read for data stream input with flow control
      -s selects port for supervisor commands
      -S selects port for supervisor reply
      -v specifies verbose operation
      -w specifies verbose streaming when reading file w/flow control
         (default is to skip all packets between read commands)
      -z zaps ITOS 28-byte header
      -e specifies sets of appids to emit in lieu of UDP commanding;
         must be last flag in the argument list; all packets streams
         are directed to localhost


Program accepts UDP packets from a single source and distributes AppId-selected packetes to enumerated ports on the machine which sent in the request(s). Supervisory commands are delivered as UDP packets and results echoed the same way; a simple text interface is provided by tincan. Multiple supervisor clients on multiple machines are allowed.

Legal commands on the supervisor channel:

    OUTPUT appid [appid] [appid]
    EXPORT machine_name appid [appid] [appid]
    CLOSE port_number

Each OUTPUT command will elicit a response assigning a port number to the particular request; the data stream will consist of binary CCSDS packets filtered by Application ID.

Legal Application ID values

    100      Observatory Power
    120      Primary Science
    121      Secondary Science
    122      Analog Housekeeping
    123-125  ASCII Text -- Comments

CLOSE will close the stream to an enumerated port, all ports on the machine originating the request (CLOSE ME), or all ports currently in use (CLOSE ALL)

The EXPORT command is intended solely for use in routing packets to a foreign machine (for example from a local network out to the world).

The STATE command returns the current state of port usage.

Controlling the data flow

If the -R flag is used for reading from a file, STDIN controls flow:

     F    forward to the next second's data
     G    go to the next command (echoed in Secondary Science)
     H    go to the next housekeeping packet
     J    jump to the next comment packet
     X    exit


    perl5.002     Minimum version of Perl interpreter required
    CRATER_GSE    Environment variable containing EGSE machine name
    /var/run/        Process IDs of program (father & child)


There are minor differences between the Perl version described here and the C version implemented on the EGSE single board computer, though they are intended to be functionally equivalent. The -R flag is not implemented in the C version.


tincan, rtlm


Bob Goeke

RCS Information

$Id: pdist,v 3.17 2008/04/04 17:22:18 goeke Exp goeke $