GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FES / V6-4-2 > fes / i845e
#include <fesBootParams.h>
#include <fesBufLib.h>
#include <fesConfig.h>
#include <fesDataFmt.h>
#include <fesDevice.h>
#include <fesFeed.h>
#include <fesFile.h>
#include <fesMemTest.h>
#include <fesMisc.h>
#include <fesMon.h>
#include <fesParm.h>
#include <fesReader.h>
#include <fesRegs.h>
#include <fesRun.h>
Classes | |
struct | ctlNode_s |
Control information for worker node. More... | |
struct | ctlBoard_s |
System-wide board indices. More... | |
struct | ctlMsgNoData_s |
Message used for dataless commands. More... | |
struct | ctlMsgRunInit_s |
Message used to initialize a run. More... | |
struct | ctlMsgRunTest_s |
Message used to initialize a test run. More... | |
struct | ctlMsgRunStatGet_s |
Message used to request run status. More... | |
struct | ctlMsgRunStat_s |
Message used to send run status. More... | |
struct | ctlMsgRunState_s |
Message used to send run state. More... | |
struct | ctlMsgState_s |
Message used to send system state. More... | |
struct | ctlMsgBoard_s |
Message used to send board data. More... | |
struct | ctlMsgDevInfoGet_s |
Message used to request device information. More... | |
struct | ctlMsgDevInfo_s |
Message used to send device information. More... | |
struct | ctlMsgMemoryGet_s |
Message used to request memory contents. More... | |
struct | ctlMsgMemory_s |
Message used to send memory contents. More... | |
struct | ctlMsgTestData_s |
Message used to generate test data. More... | |
struct | ctlMsgTrigData_s |
Message used to generate trigger test data. More... | |
struct | ctlMsgMtStart_s |
Message used to start a memory test. More... | |
struct | ctlMsgMtStats_s |
Message used to send memory test statistics. More... | |
struct | ctlMsgMtErrsGet_s |
Message used to request memory test error data. More... | |
struct | ctlMsgMtErrs_s |
Message used to send memory test error data. More... | |
struct | ctlMsgBootParm_s |
Message used to set boot parameters. More... | |
struct | ctlMsgFileInfoGet_s |
Message used to get file information. More... | |
struct | ctlMsgFileInfo_s |
Message used to send file information. More... | |
struct | ctlMsgFileDelete_s |
Message used to delete a file. More... | |
struct | ctlMsgDirCreate_s |
Message used to create a directory. More... | |
struct | ctlMsgDiskInfoGet_s |
Message used to get disk information. More... | |
struct | ctlMsgDiskInfo_s |
Message used to send disk information. More... | |
struct | ctlMsgPedesLoad_s |
Message used to load pedestals. More... | |
struct | ctlMsgConstInfo_s |
Message used to send constituent information. More... | |
struct | ctlMsgPedesGet_s |
Message used to get pedestal data. More... | |
struct | ctlMsgPedesData_s |
Message used to send pedestal data. More... | |
struct | ctlMsgRCRegGet_s |
Message used to get RC register data. More... | |
struct | ctlMsgRCRegData_s |
Message used to send RC register data. More... | |
struct | ctlMsgFERegGet_s |
Message used to get FE register data. More... | |
struct | ctlMsgFERegData_s |
Message used to send FE register data. More... | |
struct | ctlMsgMonData_s |
Message used to send monitored data. More... | |
struct | ctlMsgDataJoin_s |
Message used to join data file sets. More... | |
struct | ctlMsgNetStats_s |
Message used to send network statistics. More... | |
struct | ctlMsgRdrStat_s |
Message used to send reader statistics. More... | |
struct | ctlMsgFeedStat_s |
Message used to send memory feeder statistics. More... | |
struct | ctlMsgBufStat_s |
Message used to send buffer pool statistics. More... | |
union | ctlMsgAll_u |
Union of all message types. More... | |
struct | ctlBcast_s |
Broadcast data, one set per worker node. More... | |
Defines | |
#define | DATASZ(x) (sizeof(x) - sizeof((x).head)) |
The size of the data portion of a message. | |
#define | CTL_MAX_MSG_LENG (sizeof(ctlMsgAll_t) - sizeof(nmsgHead_t)) |
Maximum message data length. | |
Typedefs | |
typedef enum ctlFuncCode_e | ctlFuncCode_t |
Control function codes. | |
typedef enum ctlFuncType_e | ctlFuncType_t |
Control function types. | |
typedef enum ctlBcstStat_e | ctlBcstStat_t |
Broadcast status value. | |
typedef struct ctlNode_s | ctlNode_t |
Control information for worker node. | |
typedef struct ctlBoard_s | ctlBoard_t |
System-wide board indices. | |
typedef struct ctlMsgNoData_s | ctlMsgNoData_t |
Message used for dataless commands. | |
typedef struct ctlMsgRunInit_s | ctlMsgRunInit_t |
Message used to initialize a run. | |
typedef struct ctlMsgRunTest_s | ctlMsgRunTest_t |
Message used to initialize a test run. | |
typedef struct ctlMsgRunStatGet_s | ctlMsgRunStatGet_t |
Message used to request run status. | |
typedef struct ctlMsgRunStat_s | ctlMsgRunStat_t |
Message used to send run status. | |
typedef struct ctlMsgRunState_s | ctlMsgRunState_t |
Message used to send run state. | |
typedef struct ctlMsgState_s | ctlMsgState_t |
Message used to send system state. | |
typedef struct ctlMsgBoard_s | ctlMsgBoard_t |
Message used to send board data. | |
typedef struct ctlMsgDevInfoGet_s | ctlMsgDevInfoGet_t |
Message used to request device information. | |
typedef struct ctlMsgDevInfo_s | ctlMsgDevInfo_t |
Message used to send device information. | |
typedef struct ctlMsgMemoryGet_s | ctlMsgMemoryGet_t |
Message used to request memory contents. | |
typedef struct ctlMsgMemory_s | ctlMsgMemory_t |
Message used to send memory contents. | |
typedef struct ctlMsgTestData_s | ctlMsgTestData_t |
Message used to generate test data. | |
typedef struct ctlMsgTrigData_s | ctlMsgTrigData_t |
Message used to generate trigger test data. | |
typedef struct ctlMsgMtStart_s | ctlMsgMtStart_t |
Message used to start a memory test. | |
typedef struct ctlMsgMtStats_s | ctlMsgMtStats_t |
Message used to send memory test statistics. | |
typedef struct ctlMsgMtErrsGet_s | ctlMsgMtErrsGet_t |
Message used to request memory test error data. | |
typedef struct ctlMsgMtErrs_s | ctlMsgMtErrs_t |
Message used to send memory test error data. | |
typedef struct ctlMsgBootParm_s | ctlMsgBootParm_t |
Message used to set boot parameters. | |
typedef struct ctlMsgFileInfoGet_s | ctlMsgFileInfoGet_t |
Message used to get file information. | |
typedef struct ctlMsgFileInfo_s | ctlMsgFileInfo_t |
Message used to send file information. | |
typedef struct ctlMsgFileDelete_s | ctlMsgFileDelete_t |
Message used to delete a file. | |
typedef struct ctlMsgDirCreate_s | ctlMsgDirCreate_t |
Message used to create a directory. | |
typedef struct ctlMsgDiskInfoGet_s | ctlMsgDiskInfoGet_t |
Message used to get disk information. | |
typedef struct ctlMsgDiskInfo_s | ctlMsgDiskInfo_t |
Message used to send disk information. | |
typedef struct ctlMsgPedesLoad_s | ctlMsgPedesLoad_t |
Message used to load pedestals. | |
typedef struct ctlMsgConstInfo_s | ctlMsgConstInfo_t |
Message used to send constituent information. | |
typedef struct ctlMsgPedesGet_s | ctlMsgPedesGet_t |
Message used to get pedestal data. | |
typedef struct ctlMsgPedesData_s | ctlMsgPedesData_t |
Message used to send pedestal data. | |
typedef struct ctlMsgRCRegGet_s | ctlMsgRCRegGet_t |
Message used to get RC register data. | |
typedef struct ctlMsgRCRegData_s | ctlMsgRCRegData_t |
Message used to send RC register data. | |
typedef struct ctlMsgFERegGet_s | ctlMsgFERegGet_t |
Message used to get FE register data. | |
typedef struct ctlMsgFERegData_s | ctlMsgFERegData_t |
Message used to send FE register data. | |
typedef struct ctlMsgMonData_s | ctlMsgMonData_t |
Message used to send monitored data. | |
typedef struct ctlMsgDataJoin_s | ctlMsgDataJoin_t |
Message used to join data file sets. | |
typedef struct ctlMsgNetStats_s | ctlMsgNetStats_t |
Message used to send network statistics. | |
typedef struct ctlMsgRdrStat_s | ctlMsgRdrStat_t |
Message used to send reader statistics. | |
typedef struct ctlMsgFeedStat_s | ctlMsgFeedStat_t |
Message used to send memory feeder statistics. | |
typedef struct ctlMsgBufStat_s | ctlMsgBufStat_t |
Message used to send buffer pool statistics. | |
typedef union ctlMsgAll_u | ctlMsgAll_t |
Union of all message types. | |
typedef struct ctlBcast_s | ctlBcast_t |
Broadcast data, one set per worker node. | |
Enumerations | |
enum | ctlFuncCode_e { CFN_INVALID = 0, CFN_RUN_INIT = 1, CFN_RUN_TERM = 3, CFN_RUN_STATUS_GET = 4, CFN_REBOOT = 5, CFN_HEARTBEAT = 6, CFN_RUN_TEST = 7, CFN_TEST_DATA = 8, CFN_BOARD_GET = 9, CFN_DEVICE_GET = 10, CFN_CODE_LOAD = 11, CFN_TRIG_DATA = 12, CFN_MT_START = 13, CFN_MT_STOP = 14, CFN_MT_STATS_GET = 15, CFN_MT_ERRS_GET = 16, CFN_BOOT_PARM_SET = 17, CFN_RUN_STATE_GET = 18, CFN_FILE_INFO_GET = 19, CFN_FILE_DELETE = 20, CFN_DIR_CREATE = 21, CFN_DISK_INFO_GET = 22, CFN_PEDES_LOAD = 23, CFN_DATA_INFO_GET = 24, CFN_MEMORY_GET = 25, CFN_CONST_GET = 26, CFN_STATE_GET = 27, CFN_PEDES_GET = 28, CFN_RCREG_GET = 29, CFN_FEREG_GET = 30, CFN_MON_GET = 31, CFN_DATA_JOIN = 32, CFN_NET_STATS_GET = 33, CFN_RUN_START = 34, CFN_RUN_PAUSE = 35, CFN_RDR_STAT_GET = 36, CFN_FEED_STAT_GET = 37, CFN_BUF_STAT_GET = 38, CFN_BUS_RESET = 39, CTL_MAX_CMND_FN = 39 } |
Control function codes. More... | |
enum | ctlFuncType_e { CFT_HIDDEN = 0, CFT_INFO = 1, CFT_ACTION = 2 } |
Control function types. More... | |
enum | ctlBcstStat_e { BCS_DSAB = -1, BCS_OK = 0, BCS_ERROR = 1, BCS_DISC = 2 } |
Broadcast status value. More... | |
enum | { CTL_MT_ERR_BUFF_LENG = 2000, CTL_MAX_CONST_ITEMS = 20 } |
Miscellaneous constants. More... | |
Functions | |
void | fesCtlBcastFree (ctlBcast_t *bcast) |
Private routine to free a broadcast block. | |
const ctlBoard_t * | fesCtlBoard (int bIndx) |
Private routine to get a board's information. | |
int | fesCtlCheckCtlNode (void) |
Private routine to check that we're running on the control node. | |
int | fesCtlCheckStatus (ctlBcast_t *bcast) |
Private routine to check command status. | |
int | fesCtlCountIncr (ctlFuncCode_t code) |
Private routine to increment a command counter. | |
int | fesCtlFindBoard (const char *bName, int ctlOk, int *bIndx) |
Private routine to find the index of a board. | |
int | fesCtlFindNode (const char *nName, ctlNode_t **node) |
Private routine to find control info for worker node. | |
int | fesCtlHwUnit (void) |
Private routine to get the control board's hardware unit number. | |
int | fesCtlNNode (void) |
Private routine to get the number of worker nodes. | |
ctlNode_t * | fesCtlNode (int nIndx) |
Private routine to get a node's information. | |
int | fesCtlSendMsg (ctlNode_t *node, ctlMsgAll_t *msg) |
Private routine to send a command message. | |
int | fesCtlSendMsgW (ctlNode_t *node, ctlMsgAll_t *msg, ctlMsgAll_t **replyP, ctlMsgAll_t *reply, int maxData) |
Private routine to send a command message and wait for reply. | |
int | fesCtlSendToAll (ctlMsgAll_t *msg, ctlBcast_t **bcast, int lData) |
Private routine to broadcast a command message. | |
int | fesCtlSendToSome (long long bMask, ctlMsgAll_t *msg, ctlBcast_t **bcast, int lData) |
Private routine to broadcast a command message for selected boards. | |
int | fesCtlSrvrStart (void) |
Private routine to start the control server. |
$Id: fesCtlP.h,v 1.7 2010/08/19 23:25:13 saxton Exp $
anonymous enum |
enum ctlBcstStat_e |
enum ctlFuncCode_e |
Control function codes.
enum ctlFuncType_e |
void fesCtlBcastFree | ( | ctlBcast_t * | bcast | ) |
Private routine to free a broadcast block.
This routine frees a previously allocated broadcast data table along with any associated reply buffers.
bcast | The address of the broadcast block to be freed. |
const ctlBoard_t* fesCtlBoard | ( | int | bIndx | ) |
Private routine to get a board's information.
This routine returns the address of the information block for the specified board.
bIndx | The board's index. |
int fesCtlCheckCtlNode | ( | void | ) |
Private routine to check that we're running on the control node.
This routine checks whether the code is running on the control node, and reports it if not.
FES_SUCCESS | Success. | |
FES_NOTCNTRL | Not running on control node. |
int fesCtlCheckStatus | ( | ctlBcast_t * | bcast | ) |
Private routine to check command status.
This routine checks the replies from the last command broadcast, reports if any had errors, and frees the broadcast block.
bcast | The address of the broadcast block to be checked and freed. |
FES_SUCCESS | No errors occurred. | |
FES_CMDERROR | There were errors executing the command. |
int fesCtlCountIncr | ( | ctlFuncCode_t | code | ) |
Private routine to increment a command counter.
The counter for the specified command is incremented.
code | The command function code |
int fesCtlFindBoard | ( | const char * | bName, | |
int | ctlOk, | |||
int * | bIndx | |||
) |
Private routine to find the index of a board.
This routine returns the index of the specified board.
bName | The board name (type plus tower). | |
ctlOk | If TRUE, the control board is allowed; otherwise not. | |
bIndx | The address of a word to contain the returned index of the board's information. |
FES_SUCCESS | Success. | |
FES_INVBNAME | Unknown or invalid board name. |
int fesCtlFindNode | ( | const char * | nName, | |
ctlNode_t ** | node | |||
) |
Private routine to find control info for worker node.
This routine returns the address of the control block associated with the specified worker node.
nName | The name of the worker node. | |
node | The address of a pointer to receive the address of the node's control block. |
FES_SUCCESS | Success. | |
FES_UNKNODE | The node is unknown. |
int fesCtlHwUnit | ( | void | ) |
Private routine to get the control board's hardware unit number.
int fesCtlNNode | ( | void | ) |
Private routine to get the number of worker nodes.
ctlNode_t* fesCtlNode | ( | int | nIndx | ) |
Private routine to get a node's information.
nIndx | The index of the node |
int fesCtlSendMsg | ( | ctlNode_t * | node, | |
ctlMsgAll_t * | msg | |||
) |
Private routine to send a command message.
This routine sends a message to the specified worker node.
node | The address of the control parameter block for the worker node. | |
msg | The address of the message to be sent. |
FES_SUCCESS | Success. | |
FES_EMSGSEND | Error sending message |
int fesCtlSendMsgW | ( | ctlNode_t * | node, | |
ctlMsgAll_t * | msg, | |||
ctlMsgAll_t ** | replyP, | |||
ctlMsgAll_t * | reply, | |||
int | maxData | |||
) |
Private routine to send a command message and wait for reply.
This routine sends a message to the specified worker node and waits for the reply.
node | The address of the control parameter block for the worker node. | |
msg | The address of the message to be sent. | |
replyP | The address of a pointer to receive the address of the reply. If this is not the same as the default reply area, its memory must be relinquished after use via a call to free(). | |
reply | The address of a default area to receive the reply, or NULL if no such area requested. | |
maxData | The size of the data portion of the default reply. |
FES_SUCCESS | Success. | |
FES_EMSGSEND | Error sending message |
int fesCtlSendToAll | ( | ctlMsgAll_t * | msg, | |
ctlBcast_t ** | bcast, | |||
int | lData | |||
) |
Private routine to broadcast a command message.
This routine sends a message to all connected worker nodes.
msg | The address of the message to be sent. | |
bcast | The address of a pointer to an array of broadcast data, one item per worker node. If the pointer is NULL, a new array is allocated along with optional reply buffers, and its address returned. | |
lData | The length of the data portion of each allocated reply buffer. If negative, no reply buffers are allocated. |
FES_SUCCESS | Success. | |
FES_NOMEMORY | Insufficient memory for broadcast data. |
int fesCtlSendToSome | ( | long long | bMask, | |
ctlMsgAll_t * | msg, | |||
ctlBcast_t ** | bcast, | |||
int | lData | |||
) |
Private routine to broadcast a command message for selected boards.
This routine sends a message to all connected worker nodes, specifying which boards (units) on each node are affected.
bMask | The 40-bit mask word specifying which boards are to be affected. Bits 0 - 15 select tracker boards 0 - 15; bits 16 - 31 select calorimeter boards 0 - 15; bits 32 - 39 select ACD boards 0 - 7. | |
msg | The address of the message to be sent. | |
bcast | The address of a pointer to a broadcast block. If the pointer is NULL, a new block is allocated along with optional reply buffers, and its address returned. | |
lData | The length of the data portion of each allocated reply buffer. If negative, no buffers are allocated. |
FES_SUCCESS | Success. | |
FES_NOMEMORY | Insufficient memory for broadcast data. |
int fesCtlSrvrStart | ( | void | ) |
Private routine to start the control server.
This routine starts the control server on a worker node.
FES_SUCCESS | Success | |
FES_ESRVSTRT | Unable to start server. |