GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LRA / V5-2-0 > lra / rad750
#include "PBS/WCT.h"
Classes | |
struct | _LRA_regSpec |
Structure to specify a register, or set of registers. More... | |
struct | _LRA_blkDesc |
Structure for register block descriptor. More... | |
struct | _LRA_cmptDesc |
Structure for component descriptor. More... | |
struct | _LRA_regData |
Structure to hold returned register data. More... | |
struct | _LRA_esrData |
Structure to hold returned error and status register data. More... | |
struct | _LRA_cmdStats |
Structure to hold command statistics. More... | |
struct | _LRA_rcvStats |
Structure to hold receive statistics. More... | |
struct | _LRA_trcvStats |
Structure to hold TEM receive statistics. More... | |
struct | _LRA_xmtStats |
Structure to hold transmit/response statistics. More... | |
struct | _LRA_aemTrgStats |
Structure to hold AEM trigger statistics. More... | |
struct | _LRA_arcErrStats |
Structure to hold ARC event error statistics. More... | |
struct | _LRA_fifoStats |
Structure to hold CC FIFO statistics. More... | |
struct | _LRA_cntrStats |
Structure to hold simple counter statistics. More... | |
struct | _LRA_gemStats |
Structure to hold GEM statistics. More... | |
struct | _LRA_cruStats |
Structure to hold CRU statistics. More... | |
struct | _LRA_pduStats |
Structure to hold PDU statistics. More... | |
struct | _LRA_ebmStats |
Structure to hold EBM statistics. More... | |
struct | _LRA_aemStats |
Structure to hold AEM statistics. More... | |
struct | _LRA_temStats |
Structure to hold TEM statistics. More... | |
struct | _LRA_ticStats |
Structure to hold TIC statistics. More... | |
struct | _LRA_cccStats |
Structure to hold CCC statistics. More... | |
struct | _LRA_tccStats |
Structure to hold TCC statistics. More... | |
struct | _LRA_stats |
Structure to hold complete statistics. More... | |
struct | _LRA_ebmEventStats |
Structure to hold extracted EBM event statistics. More... | |
struct | _LRA_gemCntrStats |
Structure to hold extracted GEM counter statistics. More... | |
Typedefs | |
typedef enum _LRA_misc | LRA_misc |
Miscellaneous definitions. | |
typedef enum _LRA_component | LRA_component |
Component identifiers. | |
typedef enum _LRA_counts | LRA_counts |
Conponent counts. | |
typedef enum _LRA_statsVersion | LRA_statsVersion |
Statistics block version. | |
typedef struct _LRA_regSpec | LRA_regSpec |
Structure to specify a register, or set of registers. | |
typedef struct _LRA_blkDesc | LRA_blkDesc |
Structure for register block descriptor. | |
typedef struct _LRA_cmptDesc | LRA_cmptDesc |
Structure for component descriptor. | |
typedef struct _LRA_regData | LRA_regData |
Structure to hold returned register data. | |
typedef struct _LRA_esrData | LRA_esrData |
Structure to hold returned error and status register data. | |
typedef struct _LRA_cmdStats | LRA_cmdStats |
Structure to hold command statistics. | |
typedef struct _LRA_rcvStats | LRA_rcvStats |
Structure to hold receive statistics. | |
typedef struct _LRA_trcvStats | LRA_trcvStats |
Structure to hold TEM receive statistics. | |
typedef struct _LRA_xmtStats | LRA_xmtStats |
Structure to hold transmit/response statistics. | |
typedef struct _LRA_aemTrgStats | LRA_aemTrgStats |
Structure to hold AEM trigger statistics. | |
typedef struct _LRA_arcErrStats | LRA_arcErrStats |
Structure to hold ARC event error statistics. | |
typedef struct _LRA_fifoStats | LRA_fifoStats |
Structure to hold CC FIFO statistics. | |
typedef struct _LRA_cntrStats | LRA_cntrStats |
Structure to hold simple counter statistics. | |
typedef struct _LRA_gemStats | LRA_gemStats |
Structure to hold GEM statistics. | |
typedef struct _LRA_cruStats | LRA_cruStats |
Structure to hold CRU statistics. | |
typedef struct _LRA_pduStats | LRA_pduStats |
Structure to hold PDU statistics. | |
typedef struct _LRA_ebmStats | LRA_ebmStats |
Structure to hold EBM statistics. | |
typedef struct _LRA_aemStats | LRA_aemStats |
Structure to hold AEM statistics. | |
typedef struct _LRA_temStats | LRA_temStats |
Structure to hold TEM statistics. | |
typedef struct _LRA_ticStats | LRA_ticStats |
Structure to hold TIC statistics. | |
typedef struct _LRA_cccStats | LRA_cccStats |
Structure to hold CCC statistics. | |
typedef struct _LRA_tccStats | LRA_tccStats |
Structure to hold TCC statistics. | |
typedef struct _LRA_stats | LRA_stats |
Structure to hold complete statistics. | |
typedef struct _LRA_ebmEventStats | LRA_ebmEventStats |
Structure to hold extracted EBM event statistics. | |
typedef struct _LRA_gemCntrStats | LRA_gemCntrStats |
Structure to hold extracted GEM counter statistics. | |
Enumerations | |
enum | _LRA_misc { LRA_WILD = 255, LRA_ACTIVE = 254 } |
Miscellaneous definitions. More... | |
enum | _LRA_component { LRA_CPT_GEM = 1, LRA_CPT_EBM = 2, LRA_CPT_PDU0 = 3, LRA_CPT_PDU1 = 4, LRA_CPT_CRU = 5, LRA_CPT_TEM = 6, LRA_CPT_TIC = 7, LRA_CPT_CCC = 8, LRA_CPT_CRC = 9, LRA_CPT_CFE = 10, LRA_CPT_TCC = 11, LRA_CPT_TRC = 12, LRA_CPT_TFE = 13, LRA_CPT_AEM = 14, LRA_CPT_ARC = 15, LRA_CPT_AFE = 16, LRA_CPT_SIUE = 33, LRA_CPT_SIU0 = 34, LRA_CPT_SIU1 = 35, LRA_CPT_EPU0 = 36, LRA_CPT_EPU1 = 37, LRA_CPT_EPU2 = 38, LRA_CPT_BCST = LRA_WILD } |
Component identifiers. | |
enum | _LRA_counts { LRA_N_TEM = 16, LRA_N_CCC = 4, LRA_N_TCC = 8, LRA_N_CRC = 4, LRA_N_TRC = 9, LRA_N_ARC = 12, LRA_N_CFE = 12, LRA_N_TFE = 24, LRA_N_AFE = 18 } |
Conponent counts. More... | |
enum | _LRA_statsVersion { LRA_STATS_MAJOR = 4, LRA_STATS_MINOR = 0 } |
Statistics block version. More... | |
Functions | |
unsigned | LRA_bufSize (const LRA_regSpec *rSpec, unsigned *size) |
Get the size needed for the returned data buffer. | |
unsigned | LRA_clearStats (void) |
Clear the register statistics. | |
unsigned | LRA_ctrl (const LRA_regSpec *rSpec) |
Perform a control operation. | |
unsigned | LRA_getEbmEventStats (LRA_ebmEventStats *stats) |
Get a copy of the EBM event statistics. | |
unsigned | LRA_getGemCntrStats (LRA_gemCntrStats *stats) |
Get a copy of the GEM counters. | |
unsigned | LRA_getStats (LRA_stats *stats) |
Get a copy of the register statistics. | |
unsigned | LRA_initialize (unsigned period, unsigned short tems) |
Initialize the register access system. | |
unsigned | LRA_lam (unsigned cmpt, unsigned tem) |
Perform a look-at-me operation. | |
unsigned | LRA_lamLcb (unsigned cmpt, unsigned value, unsigned mask) |
Perform a look-at-me directed to an LCB. | |
unsigned | LRA_latReset (void) |
Perform a LAT reset. | |
unsigned | LRA_load (const LRA_regSpec *rSpec, long long *value) |
Perform a register load operation. | |
unsigned | LRA_lookupBlk (const LRA_cmptDesc *cDesc, const char *bName, int *block) |
Lookup register block in list. | |
unsigned | LRA_maxBufSize (unsigned *size) |
Get the maximum size needed for the register data buffer. | |
unsigned | LRA_read (const LRA_regSpec *rSpec, LRA_regData *data) |
Perform a register read operation. | |
unsigned | LRA_readEsr (LRA_esrData *esr) |
Read the error and status registers. | |
unsigned | LRA_send (const LRA_regSpec *rSpec) |
Send register values to the spacecraft. | |
unsigned | LRA_sendEsr (void) |
Send the error and status register values to the spacecraft. | |
unsigned | LRA_sendStats (void) |
Send statistics data to the spacecraft. | |
unsigned | LRA_setStatsPeriod (unsigned period) |
Set the statistics update period. | |
unsigned | LRA_setTemMask (unsigned short tems) |
Set the mask of sampled TEMs. | |
unsigned | LRA_sizeofEbmEventStats (void) |
Get the size of the EBM event statistics block. | |
unsigned | LRA_sizeofGemCntrStats (void) |
Get the size of the GEM counters block. | |
unsigned | LRA_sizeofStats (void) |
Get the size of the LRA statistics block. | |
unsigned | LRA_start (void) |
Start the register access task. | |
unsigned | LRA_startStats (void) |
Start register statistics acquisition. | |
unsigned | LRA_stop (void) |
Stop the register access task. | |
unsigned | LRA_stopStats (void) |
Stop register statistics acquisition. | |
unsigned | LRA_terminate (void) |
Terminate register access. |
$Id: LRA.h,v 1.15 2009/07/31 22:09:02 saxton Exp $
enum _LRA_counts |
Conponent counts.
enum _LRA_misc |
enum _LRA_statsVersion |
unsigned LRA_bufSize | ( | const LRA_regSpec * | rSpec, | |
unsigned * | size | |||
) |
Get the size needed for the returned data buffer.
This routine returns the size needed for the buffer used to hold the read register data.
rSpec | The specifier for the register(s) to be read | |
size | The address of the returned size, in bytes |
LRA_SUCCESS | Register specifier is valid | |
LRA_INVCMPT | Invalid component number | |
LRA_INVREG | Invalid register number | |
LRA_INVBLOCK | Invalid register block number | |
LRA_INVTEM | Invalid TEM number | |
LRA_INVCC | Invalid cable controller number | |
LRA_INVRC | Invalid readout controller number | |
LRA_INVFE | Invalid front-end number |
unsigned LRA_clearStats | ( | void | ) |
Clear the register statistics.
The register statistics are cleared, with controlled access.
LRA_SUCCESS | Success | |
LRA_NOTINIT | LRA not initialized |
unsigned LRA_ctrl | ( | const LRA_regSpec * | rSpec | ) |
Perform a control operation.
The internal routine is called to carry out the specified control operation on the specified component.
rSpec | The register specifier, specifying which instances of which component are to be operated on. It contains the component, the register block (EBM only), the TEM number, cable controller number, readout controller number, front-end number, and control function. The TEM, CC, RC and FE may be set individually to the value LRA_WILD to cause the operation to be performed on all instances. |
LRA_SUCCESS | The operation was successful | |
LRA_INVCMPT | Invalid component number | |
LRA_INVCNTRL | Invalid control operation | |
LRA_INVTEM | Invalid TEM number | |
LRA_INVCC | Invalid cable controller number | |
LRA_INVRC | Invalid readout controller number | |
LRA_INVFE | Invalid front-end number | |
ITC_SENDTID | Destination task (LRA) not started | |
LCBD_RTOERR | Operation timed out |
unsigned LRA_getEbmEventStats | ( | LRA_ebmEventStats * | stats | ) |
Get a copy of the EBM event statistics.
The EBM event statistics are copied, with controlled access. Only the operation counts are copied.
stats | The address of the area to which the statistics are to be copied |
LRA_SUCCESS | Success | |
LRA_NOTINIT | LRA not initialized |
unsigned LRA_getGemCntrStats | ( | LRA_gemCntrStats * | stats | ) |
Get a copy of the GEM counters.
The GEM extended counters are copied, with controlled access. Only the counter values are copied.
stats | The address of the area to which the counters are to be copied |
LRA_SUCCESS | Success | |
LRA_NOTINIT | LRA not initialized |
unsigned LRA_getStats | ( | LRA_stats * | stats | ) |
Get a copy of the register statistics.
The register statistics are copied, with controlled access.
stats | The address of the area to which the statistics are to be copied |
LRA_SUCCESS | Success | |
LRA_NOTINIT | LRA not initialized |
unsigned LRA_initialize | ( | unsigned | period, | |
unsigned short | tems | |||
) |
Initialize the register access system.
This routine sets up the apparatus needed by the register access system.
period | The time, in 1/100 seconds, to be used between successive updates of the register statistics. If zero, the default value is used. | |
tems | The mask of TEMs whose event receive stats are to be sampled. If zero, the default of all TEMs is used. |
LRA_SUCCESS | Initialization was successful | |
LRA_ALRDINIT | Already initialized | |
LRA_INSFMEM | Insufficient memory for initialization | |
LRA_FPAFAIL | FPA initialization failed | |
LRA_NOSEMS | Unable to create semaphores | |
LRA_NOMUTEX | Unable to create a mutex | |
LRA_NOTIMER | Unable to create a timer | |
RBM_ALOCFAIL | Memory allocation failure | |
RBM_FPAINIT | FPA initialization failure | |
RBM_NOTINIT | RBM system not initialized | |
ITC_ALOCFAIL | Cannot allocate memory | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_TASKQUEU | Cannot create task queues | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_QUEUINIT | Queue initialization failed | |
ITC_VARRNG | Out of range variable detected | |
ITC_APIDDBL | Table entry for this APID already in use |
unsigned LRA_lam | ( | unsigned | cmpnt, | |
unsigned | tem | |||
) |
Perform a look-at-me operation.
The internal routine is called to send a look-at-me to the specified component.
cmpnt | The ID of the component to be sent a look-at-me | |
tem | The TEM number to use if the component is TEM |
LRA_SUCCESS | The operation was successful | |
LRA_INVCMPT | Invalid component number | |
LRA_INVTEM | Invalid TEM number | |
ITC_SENDTID | Destination task (LRA) not started | |
LCBD_RTOERR | Operation timed out |
unsigned LRA_lamLcb | ( | unsigned | cmpnt, | |
unsigned | value, | |||
unsigned | mask | |||
) |
Perform a look-at-me directed to an LCB.
The internal routine is called to send a look-at-me to the specified LCB component.
cmpnt | The ID of the LCB component to be sent a look-at-me | |
value | The value to be sent | |
mask | The mask specifying which bits of value to use |
LRA_SUCCESS | The operation was successful | |
LRA_INVCMPT | Invalid component number | |
ITC_SENDTID | Destination task (LRA) not started | |
LCBD_RTOERR | Operation timed out |
unsigned LRA_latReset | ( | void | ) |
Perform a LAT reset.
The whole LAT is reset.
LRA_SUCCESS | Reset was successful | |
LCBD_RTOERR | Operation timed out |
unsigned LRA_load | ( | const LRA_regSpec * | rSpec, | |
long long * | value | |||
) |
Perform a register load operation.
The internal routine is called to load the specified value into one or more instances of the specified register.
rSpec | The register specifier, specifying which register (or set of registers) is (are) to be loaded. This contains the device, the register block, the TEM number, cable controller number, readout controller number, front-end number, and register number. The four parameters tem, cc, rc and fe may be set individually to the value LRA_WILD to cause the value to be loaded in all places. | |
value | The address of the value to be loaded into the specified instances of the register. |
LRA_SUCCESS | Load was successful | |
LRA_INVCMPT | Invalid component number | |
LRA_INVREG | Invalid register number | |
LRA_INVBLOCK | Invalid register block number | |
LRA_INVTEM | Invalid TEM number | |
LRA_INVCC | Invalid cable controller number | |
LRA_INVRC | Invalid readout controller number | |
LRA_INVFE | Invalid front-end number | |
ITC_SENDTID | Destination task (LRA) not started | |
LCBD_RTOERR | Operation timed out |
unsigned LRA_lookupBlk | ( | const LRA_cmptDesc * | cDesc, | |
const char * | bName, | |||
int * | block | |||
) |
Lookup register block in list.
The register block name is used to locate and return the matching block number in the list of valid blocks for the given component.
cDesc | The component descriptor. | |
bName | The register block name. | |
block | The address of an integer to receive the register block number. |
LRA_SUCCESS | Success | |
LRA_INVBLOCK | Invalid register block name |
unsigned LRA_maxBufSize | ( | unsigned * | size | ) |
Get the maximum size needed for the register data buffer.
This routine returns the maximum size needed for the buffer used to hold the read register data. It assumes the maximum possible wild carding of the register description.
size | The address of the returned maximum size, in bytes |
LRA_SUCCESS | Always success |
unsigned LRA_read | ( | const LRA_regSpec * | rSpec, | |
LRA_regData * | data | |||
) |
Perform a register read operation.
The internal routine is called to read the specified registers into the supplied data area. This area is presumed to be big enough to hold the data, and the correct size may be determined in advance by calling the LRA_bufSize routine.
rSpec | The register specifier, specifying which register (or set of registers) is (are) to be read. This contains the component, the register block, the TEM number, cable controller number, readout controller number, front-end number, and register number. The latter five parameters may be set individually to the value LRA_WILD to cause all values to be used. | |
data | The address of an area to receive the read register values. This is a formatted block designed to be almost stand-alone. It contains the register specifier, counts of the number of values used for each of the last five parameters, the size of each register value, and the array of register values arranged with outer loop to inner loop ordered TEM, CC, RC, FE and register. |
LRA_SUCCESS | Read was successful | |
LRA_INVCMPT | Invalid component number | |
LRA_INVREG | Invalid register number | |
LRA_INVBLOCK | Invalid register block number | |
LRA_INVTEM | Invalid TEM number | |
LRA_INVCC | Invalid cable controller number | |
LRA_INVRC | Invalid readout controller number | |
LRA_INVFE | Invalid front-end number | |
ITC_SENDTID | Destination task (LRA) not started | |
LCBD_RTOERR | Operation timed out |
unsigned LRA_readEsr | ( | LRA_esrData * | esr | ) |
Read the error and status registers.
The internal routine is called to read and store the contents of a pre-determined set of LAT error and status registers. No error is reported if a read operation times out.
esr | The address of an area to receive the register values |
LRA_SUCCESS | The registers were read successfully | |
ITC_SENDTID | Destination task (LRA) not started |
unsigned LRA_send | ( | const LRA_regSpec * | rSpec | ) |
Send register values to the spacecraft.
A request is queued to the LRA task to read the specified registers and send them to the spacecraft via the SSR.
rSpec | The register specifier, specifying which register (or set of registers) is (are) to be read. This contains the component, the register block, the TEM number, cable controller number, readout controller number, front-end number, and register number. The latter five parameters may be set individually to the value LRA_WILD to cause all values to be used. |
LRA_SUCCESS | The read and send were successful | |
LRA_INVCMPT | Invalid component number | |
LRA_INVREG | Invalid register number | |
LRA_INVBLOCK | Invalid register block number | |
LRA_INVTEM | Invalid TEM number | |
LRA_INVCC | Invalid cable controller number | |
LRA_INVRC | Invalid readout controller number | |
LRA_INVFE | Invalid front-end number | |
LCBD_RTOERR | Operation timed out | |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task (LRA) not started |
unsigned LRA_sendEsr | ( | void | ) |
Send the error and status register values to the spacecraft.
A request is queued to the LRA task to read the contents of a pre- determined set of LAT error and status registers and send them to the spacecraft via the SSR.
LRA_SUCCESS | The read and send were successful | |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task (LRA) not started |
unsigned LRA_sendStats | ( | void | ) |
Send statistics data to the spacecraft.
A request is queued to the LRA task to send the statistics data block to the spacecraft via the SSR.
LRA_SUCCESS | The statistics were sent successfully | |
LRA_NOTINIT | LRA not initialized | |
ITC_SENDNID | Destination node not reachable | |
ITC_SENDPRX | Proxy task for destination node not started | |
ITC_SENDQID | Destination queue not available | |
ITC_SENDTID | Destination task not started |
unsigned LRA_setStatsPeriod | ( | unsigned | period | ) |
Set the statistics update period.
This routine sets the statistics update period to a new value.
period | The time, in 1/100 seconds, to be used between successive updates of the register statistics. If zero, the default value is used. |
LRA_SUCCESS | Success | |
LRA_NOTINIT | LRA not initialized |
unsigned LRA_setTemMask | ( | unsigned short | tems | ) |
Set the mask of sampled TEMs.
This routine sets the mask of TEMs whose events received statistics are to be sampled.
tems | The bit mask of TEMs to be sampled. |
LRA_SUCCESS | Success | |
LRA_NOTINIT | LRA not initialized |
unsigned LRA_sizeofEbmEventStats | ( | void | ) |
Get the size of the EBM event statistics block.
The size of the EBM event statistics block is returned.
unsigned LRA_sizeofGemCntrStats | ( | void | ) |
Get the size of the GEM counters block.
The size of the GEM extended counters block is returned.
unsigned LRA_sizeofStats | ( | void | ) |
Get the size of the LRA statistics block.
The size of the whole LRA statistics block is returned.
unsigned LRA_start | ( | void | ) |
Start the register access task.
This routine starts the register access task after checking that initialization has been successful.
LRA_SUCCESS | The task was started successfully | |
LRA_NOTINIT | LRA not initialized | |
ITC_ALOCFAIL | Cannot allocate for fork control block | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_FORKINIT | Fork initialization failed | |
ITC_FORKQHND | Cannot recover all fork queue handles (obscure) | |
ITC_NOTINIT | ITC control block does not exist |
unsigned LRA_startStats | ( | void | ) |
Start register statistics acquisition.
The periodic updating of the register statistics block is started after the registers and statistics are cleared.
LRA_SUCCESS | Success | |
LRA_NOTINIT | LRA not initialized |
unsigned LRA_stop | ( | void | ) |
Stop the register access task.
This routine stops the register access task.
LRA_SUCCESS | The task was stopped successfully | |
LRA_NOTINIT | LRA not initialized | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation |
unsigned LRA_stopStats | ( | void | ) |
Stop register statistics acquisition.
The periodic updating of the register statistics block is stopped.
LRA_SUCCESS | Success | |
LRA_NOTINIT | LRA not initialized |
unsigned LRA_terminate | ( | void | ) |
Terminate register access.
This routine frees all resources used by the register access system.
LRA_SUCCESS | Termination was successful | |
LRA_NOTINIT | LRA not initialized |