#ifndef INC_PDEVCMDS #define INC_PDEVCMDS /* * program identifiers used in messages */ #define PRGID_BPCMD "bpcmd" #define PRGID_BPINP "bpinp" #define PRGID_BPOUT "bpout" /* * Commands sent to the shared memory programs: * Source: * pnet->prun->psrv.. * bpCmd -> bpInp,bpOut * * When sent thru the shared memory nodes: * 1. short nosed used (data limited to 4k) * 2. the command goes in node.subType field. * the node.type is set to BP_NDTYPE_CMD=3 (see bufpool.h) * 3. There is a msgId in the node. bpCmd sets it. Replys will have the * same number. this is how bpCmd recognizes where the reply comes * from. * * ----------------------------------------------------------------------------- * BPCMD_CMD_FILE - file command * ----------------------------------------------------------------------------- * External user -> bpCmd .. goes to bpOut.. but put on bpInp queue * F type (fits,pdev) - type of file * This will deselect the other file type * Should do this before data recording (pnet) * - reply ok: or err: * passed back in pnode.data * ----------------------------------------------------------------------------- * BPCMD_CMD_DBG - debug command. Programs send back ascii data about themselves * ----------------------------------------------------------------------------- * * External user -> bpCmd, or bpInp,bpOut via bpCmd. * externalUser->bpCmd * D prgnam .. bpinp,bpout,bpcmd * bpCmd-> external user * "ok:" or "err:" * Followed by the ascii debug info.. limited to 4k * * bpCmd-> nodes * node.subtype="D" * data none * nodes -> bpCmd * note.pdata holds the ascii info. * node.blksize holds how long it is. * ----------------------------------------------------------------------------- * BPCMD_CMD_NOP - nop command. * ----------------------------------------------------------------------------- * External user -> bpCmd, or bpInp,bpOut via bpCmd. * externalUser->bpCmd * N prgnam .. bpinp,bpout,bpcmd * reply bpCmd-> external user * "ok:" or "err:" * bpCmd-> nodes * node.subtype="N" * data none * ----------------------------------------------------------------------------- * BPCMD_CMD_SETP - SETP command from pnetctl to bpOut * ----------------------------------------------------------------------------- * External user -> bpCmd, or bpInp,bpOut via bpCmd. * externalUser->bpCmd * N prgnam .. bpinp,bpout,bpcmd * reply bpCmd-> external user * "ok:" or "err:" * bpCmd-> nodes * node.subtype="N" * data none * ----------------------------------------------------------------------------- * BPCMD_CMD_SHM- shm info command. * ----------------------------------------------------------------------------- * External user -> bpCmd, * S * reply bpCmd-> external user * "ok:" or "err:" * followed by ascii data showing the current queue usage * * ----------------------------------------------------------------------------- * PSRV_CMD_OPENFILE sent psrv to bpInp,bpOut. * ----------------------------------------------------------------------------- * u32 - first seq number to use * u32 - nblocks to write before done with run * u32 - maxFilesize in Kb before switching to next file.0--> no switch *+ u32 - number of blocks per pnode we will be using. Each block * is an accumulated output from pdev. * The last may dump may be different. * string- /dir/fname up to sequence number (without.). null terminated * Notes: this command comes from pnet. psrv passes it along in the * the msg queues to bpInp then bpOut. * 08may08 .. tried switching to 4 bytes by pnode only has 1 byte for subtype. * goback to 1 byte */ // value passed in subtype char of pnode in shm #define BPCMD_CMD_DBG 'D' #define BPCMD_CMD_FILE 'F' #define BPCMD_CMD_NOP 'N' #define BPCMD_CMD_PSET 'S' #define BPCMD_CMD_SIGSTAT 'R' #define PSRVCMD_OPENFILE 'P' // 4byte ascii string version of commands. passed around sockets. #define BPCMDS_CMD_DBG "DBG " #define BPCMDS_CMD_FILE "F " #define BPCMDS_CMD_NOP "NOP " #define BPCMDS_CMD_PSET "PSET" #define BPCMDS_CMD_SIGSTAT "SIGS" #endif