next up previous contents index
Next: Memory Buffers Up: Interprocess communication Previous: Synchronization Primitives   Contents   Index


Command Protocol

For processes located at different machines a simple protocol over TCP/IP was developed. We recognized the idea of CORBA but found that in our case TCP/IP suits well.

Table 6 lists messages passing from the daq_ctrl process to the daq_main process and backward. Each message starts with a message ID followed by variable number of arguments. The number and meaning of variables are specified in the Table 7.


Table 6: Messages
MESSAGE ID DESCRIPTION
daq_ctrl $\rightarrow$ daq_main
STARTUP 1 initiate the system
SHUTDOWN 2 terminate the system
SOR 3 start of run
EOR 4 end of run
POR 5 pause of run
COR 6 continuation of run
RST 19 restart process
KILL 20 kill process
FEINIT 21 initialize FE electronics
daq_main $\rightarrow$ daq_ctrl
EMPTY 0 empty command - do nothing, used as acknowledgment for a previous command
EORN 7 EOR caused by events number limit
CHST 8 change of state
NEVT 9 informs about the number of recorded events or about the number of collected events if recording is switched off; contains also information about process states
MOND 10 connection to the monitor daemon established
REC 11 recording statistics
QTI 12 information about percentage of tape usage
QTW 13 warning: tape size can be exceeded soon
EOT 14 end of tape reached
UMNT 15 unmount tape
MNT 16 mount tape
PEOF 17 pseudo eof reached - open new file
RPS 18 pause of recording



Table 7: Message arguments.
Message Arg size Description
  (bytes)  
EMPTY 0 no
STARTUP 1 processes to be activated
  1 run type
  1 recording type
  1 readout electronics architecture
  8 tape VID
SHUTDOWN 0 no
SOR 4 run number
  4 maximum number of events per run
EOR 4 run number
POR 4 run number
COR 4 run number
FEINIT 0 no
RST 1 EP
KILL 1 EP
EORN 4 run number
CHST 1 EP which changed state
  1 new state
NEVT 4 number of events
  3 EP states (daq_fe, daq_rec, daq_mon)
MOND 0 no
daq_rec 4 number of written records (events)
  4 number of written Mbytes
  4 number of written bytes ($<$1Mb)
  4 number of written files
QTI 4 percentage of tape usage
QTW 0 no
PEOF 4 number of written records (events)
  4 number of written Mbytes
  4 number of written bytes ($<$1Mb)
  4 number of written files
EOT 0 no
UMNT 0 no
MNT 8 tape VID
RPS x undefined yet



next up previous contents index
Next: Memory Buffers Up: Interprocess communication Previous: Synchronization Primitives   Contents   Index
Alexander V.Inyakin 2002-04-05