GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LRA / V5-2-3 > lra / rhel5-64
#include <LRA/LRA.h>
#include <PBS/FPA.h>
#include <PBS/MTX.h>
#include <PBS/SEM.h>
#include <PBS/WUT.h>
#include <ITC/ITC_pubdefs.h>
#include <IMM/RBM_pubdefs.h>
#include <LEM/list.h>
Classes | |
struct | _LRA_return |
Request return block. More... | |
struct | _LRA_cmdList |
Command list structure. More... | |
struct | _LRA_rspList |
Response list structure. More... | |
struct | _LRA_dataItem |
Read data item structure. More... | |
struct | _LRA_dcdItem |
Decode list item structure. More... | |
struct | _LRA_crl |
struct | _LRA_sregData |
Structure to hold raw statistics registers. More... | |
struct | _LRA_crReg |
Command/response statistics register. More... | |
struct | _LRA_rcvReg |
Receive statistics register. More... | |
struct | _LRA_xmtReg |
Transmit statistics register. More... | |
struct | _LRA_aemCstReg |
AEM common status register. More... | |
struct | _LRA_aemFstReg |
AEM FREE board status register. More... | |
struct | _LRA_aemTstReg |
AEM trigger message statistics register. More... | |
struct | _LRA_temStReg |
TEM status register. More... | |
struct | _LRA_ticStReg |
TIC status register. More... | |
struct | _LRA_cccStReg |
CCC status register. More... | |
struct | _LRA_tccStReg |
TCC status register. More... | |
struct | _LRA_control |
Control structure. More... | |
struct | _LRA_whiteBox |
White-box access structure. More... | |
Defines | |
#define | NELEM(x) (sizeof x / sizeof x[0]) |
Array size macro. | |
Typedefs | |
typedef enum _LRA_function | LRA_function |
Function codes. | |
typedef enum _LRA_miscP | LRA_miscP |
Miscellaneous private constants. | |
typedef enum _LRA_gctWidth | LRA_gctWidth |
GEM counter register widths. | |
typedef struct _LRA_return | LRA_return |
Request return block. | |
typedef struct _LRA_cmdList | LRA_cmdList |
Command list structure. | |
typedef struct _LRA_rspList | LRA_rspList |
Response list structure. | |
typedef void(* | LRA_decodeFn )(const unsigned short *pkt, void *data) |
Decode function type. | |
typedef struct _LRA_dataItem | LRA_dataItem |
Read data item structure. | |
typedef struct _LRA_dcdItem | LRA_dcdItem |
Decode list item structure. | |
typedef struct _LRA_crl | LRA_crl |
Command/response list anchor block. | |
typedef struct _LRA_sregData | LRA_sregData |
Structure to hold raw statistics registers. | |
typedef struct _LRA_crReg | LRA_crReg |
Command/response statistics register. | |
typedef struct _LRA_rcvReg | LRA_rcvReg |
Receive statistics register. | |
typedef struct _LRA_xmtReg | LRA_xmtReg |
Transmit statistics register. | |
typedef struct _LRA_aemCstReg | LRA_aemCstReg |
AEM common status register. | |
typedef struct _LRA_aemFstReg | LRA_aemFstReg |
AEM FREE board status register. | |
typedef struct _LRA_aemTstReg | LRA_aemTstReg |
AEM trigger message statistics register. | |
typedef struct _LRA_temStReg | LRA_temStReg |
TEM status register. | |
typedef struct _LRA_ticStReg | LRA_ticStReg |
TIC status register. | |
typedef struct _LRA_cccStReg | LRA_cccStReg |
CCC status register. | |
typedef struct _LRA_tccStReg | LRA_tccStReg |
TCC status register. | |
typedef struct _LRA_control | LRA_control |
Control structure. | |
typedef unsigned | LRA_fnCheck (int func, const LRA_regSpec *rSpec, const LRA_cmptDesc **desc) |
Typedefs for private functions. | |
typedef void | LRA_fnDecodeAFE (const unsigned short *pkt, unsigned short *value) |
typedef void | LRA_fnDecodeARC (const unsigned short *pkt, unsigned short *value) |
typedef void | LRA_fnDecodeCFE (const unsigned short *pkt, unsigned short *value) |
typedef void | LRA_fnDecodeCRC (const unsigned short *pkt, unsigned short *value) |
typedef void | LRA_fnDecodeTDC (const unsigned short *pkt, long long *value) |
typedef void | LRA_fnDecodeTFE (const unsigned short *pkt, long long *value) |
typedef void | LRA_fnDecodeTRC (const unsigned short *pkt, long long *value) |
typedef unsigned | LRA_fnDoCtrl (LEM_micr *crl, const LRA_regSpec *rSpec) |
typedef unsigned | LRA_fnDoLam (LEM_micr *crl, unsigned cmpt, unsigned tem) |
typedef unsigned | LRA_fnDoLamLcb (LEM_micr *crl, unsigned cmpt, unsigned value, unsigned mask) |
typedef unsigned | LRA_fnDoLoad (LEM_micr *crl, const LRA_regSpec *rSpec, const unsigned long long *value) |
typedef unsigned | LRA_fnDoRead (LEM_micr *crl, const LRA_regSpec *rSpec, LRA_regData *data) |
typedef unsigned | LRA_fnDoReadEsr (LEM_micr *crl, LRA_esrData *esr) |
typedef unsigned | LRA_fnDoSend (const LRA_regSpec *rSpec, int ssr) |
typedef unsigned | LRA_fnDoSendEsr (void) |
typedef unsigned | LRA_fnDoSendStats (void) |
typedef unsigned | LRA_fnFreeStats (LRA_control *ctrl) |
typedef unsigned | LRA_fnInitStats (LRA_control *ctrl) |
typedef unsigned | LRA_fnGetCtrl (LRA_control **ctrl) |
typedef unsigned | LRA_fnProcess (void *prm, const ITC_QueueItem *qItem, void *pay, unsigned len) |
typedef unsigned | LRA_fnUpdateStats (LRA_control *ctrl, int clear) |
typedef struct _LRA_whiteBox | LRA_whiteBox |
White-box access structure. | |
Enumerations | |
enum | _LRA_function { LRA_FNC_READ = 0, LRA_FNC_LOAD = 1, LRA_FNC_CONTROL = 2, LRA_FNC_SEND = 10, LRA_FNC_SENDESR = 11, LRA_FNC_SENDSTATS = 12 } |
Function codes. More... | |
enum | _LRA_miscP { LRA_NUM_RQSTS = 4, LRA_NUM_UPDATE = 1, LRA_NUM_PKTS = 10, LRA_MAX_DATA = 4096, LRA_NUM_DGMS = 5, LRA_MAX_CNTRL = 15, LRA_MAX_CRL = 160, LRA_CTR_OFLOW = 0x3fff, LRA_DFLT_PRD = 100, LRA_DFLT_TEMS = 0xffff } |
Miscellaneous private constants. More... | |
enum | _LRA_gctWidth { LRA_GCW_TIMEBASE = 25, LRA_GCW_LIVETIME = 25, LRA_GCW_PRESCALE = 24, LRA_GCW_DISCARD = 24, LRA_GCW_SENT = 16, LRA_GCW_DEADZONE = 16 } |
GEM counter register widths. More... | |
Functions | |
unsigned | LRA_check (int func, const LRA_regSpec *rSpec, const LRA_cmptDesc **desc) |
Validate register operation parameters. | |
void | LRA_decodeAFE (const unsigned short *pkt, unsigned short *value) |
Decode an ACD front-end register value. | |
void | LRA_decodeARC (const unsigned short *pkt, unsigned short *value) |
Decode an ACD readout controller register value. | |
void | LRA_decodeCFE (const unsigned short *pkt, unsigned short *value) |
Decode a calorimeter front-end register value. | |
void | LRA_decodeCRC (const unsigned short *pkt, unsigned short *value) |
Decode a calorimeter readout controller register value. | |
void | LRA_decodeTDC (const unsigned short *pkt, long long *value) |
Decode a tracker DAC register value. | |
void | LRA_decodeTFE (const unsigned short *pkt, long long *value) |
Decode a tracker front-end register value. | |
void | LRA_decodeTRC (const unsigned short *pkt, long long *value) |
Decode a tracker readout controller register value. | |
unsigned | LRA_doCtrl (LEM_micr *crl, const LRA_regSpec *rSpec) |
Internal routine to handle a control operation request. | |
unsigned | LRA_doLam (LEM_micr *crl, unsigned cmpt, unsigned tem) |
Internal routine to handle a look-at-me request. | |
unsigned | LRA_doLamLcb (LEM_micr *crl, unsigned cmpt, unsigned value, unsigned mask) |
Internal routine to handle a look-at-me request directed to an LCB. | |
unsigned | LRA_doLoad (LEM_micr *crl, const LRA_regSpec *rSpec, const unsigned long long *value) |
Internal routine to handle a register load request. | |
unsigned | LRA_doRead (LEM_micr *crl, const LRA_regSpec *rSpec, LRA_regData *data) |
Internal routine to handle a register read request. | |
unsigned | LRA_doReadEsr (LEM_micr *crl, LRA_esrData *esr) |
Internal routine to read the error and status registers. | |
unsigned | LRA_doSend (const LRA_regSpec *rSpec, int ssr) |
Send register data to the spacecraft. | |
unsigned | LRA_doSendEsr (void) |
Send ESR data to the spacecraft. | |
unsigned | LRA_doSendStats (void) |
Send statistics data to the spacecraft. | |
unsigned | LRA_freeStats (LRA_control *ctrl) |
Free statistics processing resources. | |
unsigned | LRA_initStats (LRA_control *ctrl) |
Initialize for statistics processing. | |
unsigned | LRA_getCtrl (LRA_control **ctrl) |
Get the control structure address. | |
unsigned | LRA_process (void *prm, const ITC_QueueItem *qItem, void *pay, unsigned len) |
Process a received request. | |
unsigned | LRA_updateStats (LRA_control *ctrl, int clear) |
Update the register statistics. |
$Id: LRA_p.h,v 1.14 2011/03/28 16:14:05 saxton Exp $
enum _LRA_function |
Function codes.
enum _LRA_gctWidth |
enum _LRA_miscP |
Miscellaneous private constants.
unsigned LRA_check | ( | int | func, | |
const LRA_regSpec * | rSpec, | |||
const LRA_cmptDesc ** | desc | |||
) |
Validate register operation parameters.
The parameters of a register operation are checked for validity.
func | The function to be performed. | |
rSpec | The specifier for the register(s). | |
desc | The address of a pointer to receive the address of the component descriptor. |
LRA_SUCCESS | Parameters are valid | |
LRA_INVCMPT | Invalid component number | |
LRA_INVREG | Invalid register number | |
LRA_INVCNTRL | Invalid control operation | |
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 |
References _LRA_cmptDesc::bDesc, _LRA_regSpec::block, _LRA_regSpec::cc, _LRA_blkDesc::cfgMask, _LRA_regSpec::cmpnt, _LRA_cmptDesc::ctlFns, _LRA_regSpec::fe, _LRA_cmptDesc::id, LRA_ACTIVE, LRA_FNC_CONTROL, LRA_FNC_LOAD, LRA_FNC_READ, LRA_MAX_CNTRL, LRA_WILD, _LRA_cmptDesc::maxCc, _LRA_cmptDesc::maxFe, _LRA_cmptDesc::maxRc, _LRA_blkDesc::maxReg, _LRA_cmptDesc::maxTem, _LRA_cmptDesc::nBlock, NELEM, _LRA_regSpec::rc, _LRA_regSpec::reg, _LRA_blkDesc::regMask, and _LRA_regSpec::tem.
Referenced by LRA_bufSize(), LRA_doCtrl(), LRA_doLoad(), and LRA_doRead().
void LRA_decodeAFE | ( | const unsigned short * | pkt, | |
unsigned short * | value | |||
) |
Decode an ACD front-end register value.
This routine decodes ACD front-end register data by extracting the register contents from the returned structure.
Referenced by LRA_doRead(), and LRA_doReadEsr().
void LRA_decodeARC | ( | const unsigned short * | pkt, | |
unsigned short * | value | |||
) |
Decode an ACD readout controller register value.
This routine decodes ACD readout controller register data by extracting the register contents from the returned structure.
Referenced by LRA_doRead(), and LRA_doReadEsr().
void LRA_decodeCFE | ( | const unsigned short * | pkt, | |
unsigned short * | value | |||
) |
Decode a calorimeter front-end register value.
This routine decodes calorimeter front-end register data by extracting the register contents from the returned structure.
Referenced by LRA_doRead().
void LRA_decodeCRC | ( | const unsigned short * | pkt, | |
unsigned short * | value | |||
) |
Decode a calorimeter readout controller register value.
This routine decodes calorimeter readout controller register data by extracting the register contents from the returned structure.
Referenced by LRA_doRead(), and LRA_doReadEsr().
void LRA_decodeTDC | ( | const unsigned short * | pkt, | |
long long * | value | |||
) |
Decode a tracker DAC register value.
This routine decodes tracker DAC register data by extracting the register contents from the returned structure.
Referenced by LRA_doRead().
void LRA_decodeTFE | ( | const unsigned short * | pkt, | |
long long * | value | |||
) |
Decode a tracker front-end register value.
This routine decodes tracker front-end register data by extracting the register contents from the returned structure.
Referenced by LRA_doRead().
void LRA_decodeTRC | ( | const unsigned short * | pkt, | |
long long * | value | |||
) |
Decode a tracker readout controller register value.
This routine decodes tracker readout controller register data by extracting the register contents from the returned structure.
Referenced by LRA_doRead(), and LRA_doReadEsr().
unsigned LRA_doCtrl | ( | LEM_micr * | crl, | |
const LRA_regSpec * | rSpec | |||
) |
Internal routine to handle a control operation request.
The specified control operation is performed on the specified component.
crl | The address of a multi-item command/response list to be used in the register operations. | |
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 | |
LCBD_RTOERR | Operation timed out |
References _LRA_regSpec::block, _LRA_regSpec::cc, _LRA_regSpec::cmpnt, _LRA_regSpec::fe, LRA_ACTIVE, LRA_check(), LRA_FNC_CONTROL, LRA_WILD, _LRA_cmptDesc::maxTem, _LRA_regSpec::rc, _LRA_regSpec::reg, and _LRA_regSpec::tem.
Referenced by LRA_CONTROL(), and LRA_ctrl().
unsigned LRA_doLam | ( | LEM_micr * | crl, | |
unsigned | cmpnt, | |||
unsigned | tem | |||
) |
Internal routine to handle a look-at-me request.
This routine sends a look-at-me to the specified component.
crl | The address of a multi-item command/response list to be used in the register operations. | |
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 | |
LCBD_RTOERR | Operation timed out |
unsigned LRA_doLamLcb | ( | LEM_micr * | crl, | |
unsigned | cmpnt, | |||
unsigned | value, | |||
unsigned | mask | |||
) |
Internal routine to handle a look-at-me request directed to an LCB.
This routine sends a look-at-me to the specified LCB component.
crl | The address of a multi-item command/response list to be used in the register operations. | |
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 | |
LCBD_RTOERR | Operation timed out |
References NELEM.
Referenced by LRA_lamLcb(), and LRA_LAMLCB().
unsigned LRA_doLoad | ( | LEM_micr * | crl, | |
const LRA_regSpec * | rSpec, | |||
const unsigned long long * | value | |||
) |
Internal routine to handle a register load request.
This routine loads the specified value into one or more instances of the specified register.
crl | The address of a multi-item command/response list to be used in the register operations. | |
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 | |
LCBD_RTOERR | Operation timed out |
References _LRA_regSpec::block, _LRA_regSpec::cc, _LRA_regSpec::cmpnt, _LRA_regSpec::fe, LRA_ACTIVE, LRA_check(), LRA_FNC_LOAD, LRA_WILD, _LRA_cmptDesc::maxTem, _LRA_regSpec::rc, _LRA_regSpec::reg, and _LRA_regSpec::tem.
Referenced by LRA_load(), and LRA_LOAD().
unsigned LRA_doRead | ( | LEM_micr * | crl, | |
const LRA_regSpec * | rSpec, | |||
LRA_regData * | data | |||
) |
Internal routine to handle a register read request.
This routine reads one or more instances of the specified register into the supplied data area.
crl | The address of a multi-item command/response list to be used in the register operations. | |
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 | |
LCBD_RTOERR | Operation timed out |
References _LRA_cmptDesc::bDesc, _LRA_regSpec::block, _LRA_regSpec::cc, _LRA_regSpec::cmpnt, _LRA_regSpec::fe, LRA_ACTIVE, LRA_check(), LRA_decodeAFE(), LRA_decodeARC(), LRA_decodeCFE(), LRA_decodeCRC(), LRA_decodeTDC(), LRA_decodeTFE(), LRA_decodeTRC(), LRA_FNC_READ, LRA_WILD, _LRA_cmptDesc::maxCc, _LRA_cmptDesc::maxFe, _LRA_cmptDesc::maxRc, _LRA_blkDesc::maxReg, _LRA_cmptDesc::maxTem, _LRA_cmptDesc::nBlock, _LRA_regData::nCc, _LRA_regData::nFe, _LRA_regData::nRc, _LRA_blkDesc::nReg, _LRA_regData::nReg, _LRA_regData::nTem, _LRA_regSpec::rc, _LRA_regSpec::reg, _LRA_blkDesc::regMask, _LRA_regData::rSpec, _LRA_blkDesc::rWidth, _LRA_regSpec::tem, _LRA_regData::tMask, _LRA_regData::value, and _LRA_regData::width.
Referenced by LRA_doSend(), and LRA_read().
unsigned LRA_doReadEsr | ( | LEM_micr * | crl, | |
LRA_esrData * | esr | |||
) |
Internal routine to read the error and status registers.
This routine reads and stores the contents of a pre-determined set of LAT error and status registers. No error is produced if any of the reads times out.
crl | The address of a multi-item command/response list to be used in the register operations. | |
esr | The address of an area to receive the register values |
LRA_SUCCESS | The registers were read successfully |
References _LRA_esrData::afe, _LRA_esrData::arc, _LRA_esrData::crc, LRA_decodeAFE(), LRA_decodeARC(), LRA_decodeCRC(), LRA_decodeTRC(), LRA_N_AFE, LRA_N_ARC, LRA_N_CCC, LRA_N_CRC, LRA_N_TCC, LRA_N_TEM, LRA_N_TRC, and _LRA_esrData::trc.
Referenced by LRA_doSendEsr(), and LRA_readEsr().
unsigned LRA_doSend | ( | const LRA_regSpec * | rSpec, | |
int | ssr | |||
) |
Send register data to the spacecraft.
This routine is called indirectly whenever a READ telecommand arrives. It calls the register read routine and sends back the status and register data.
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. | |
ssr | If TRUE, the data is sent on the science stream, and can be maximum sized. Otherwise it is sent on the diagnostic stream, and is limited to 4 KBytes. |
LRA_SUCCESS | The registers were read and sent successfully | |
LRA_NOTINIT | LRA not initialized | |
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 | |
LRA_EXCSDATA | Too much data for the diagnostic stream | |
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 not started |
References _LRA_control::crl, _LRA_control::dFcb, LRA_DGT_REGS, LRA_doRead(), LRA_getCtrl(), LRA_MAX_DATA, LRA_SCI_APID, _LRA_regData::nCc, _LRA_regData::nFe, _LRA_regData::nRc, _LRA_regData::nReg, _LRA_regData::nTem, _LRA_control::rData, sendDiag(), sendSSR(), _LRA_control::sFcb, and _LRA_regData::width.
Referenced by LRA_process(), and LRA_READ().
unsigned LRA_doSendEsr | ( | void | ) |
Send ESR data to the spacecraft.
This routine reads the error and status register data and sends it to the spacecraft via the science stream.
LRA_SUCCESS | The registers were read and 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 |
References _LRA_control::crl, _LRA_control::eData, LRA_DGT_ESR, LRA_doReadEsr(), LRA_getCtrl(), LRA_SCI_APID, sendSSR(), and _LRA_control::sFcb.
Referenced by LRA_ESRSEND(), and LRA_process().
unsigned LRA_doSendStats | ( | void | ) |
Send statistics data to the spacecraft.
This routine sends the accumulated register statistics to the spacecraft via the science stream.
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 |
References LRA_DGT_STATS, LRA_getCtrl(), LRA_SCI_APID, sendSSR(), _LRA_control::sFcb, _LRA_control::statMtx, and _LRA_control::stats.
Referenced by LRA_process(), and LRA_STATSEND().
unsigned LRA_freeStats | ( | LRA_control * | ctrl | ) |
Free statistics processing resources.
The command lists used for reading statistics registers are freed.
ctrl | The address of the LRA control block |
LRA_SUCCESS | Success always |
References freeCrl(), and _LRA_control::sCrl.
Referenced by LRA_terminate().
unsigned LRA_getCtrl | ( | LRA_control ** | ctrl | ) |
Get the control structure address.
This routine returns the address of the internal control structure. It is internal to the LRA system.
ctrl | The address of a pointer to receive the address of the control structure. |
LRA_SUCCESS | Address obtained successfully | |
LRA_NOTINIT | LRA not initialized |
Referenced by doRequest(), LRA_CONTROL(), LRA_doSend(), LRA_doSendEsr(), LRA_doSendStats(), LRA_LAM(), LRA_LAMLCB(), and LRA_LOAD().
unsigned LRA_initStats | ( | LRA_control * | ctrl | ) |
Initialize for statistics processing.
The command lists needed for reading statistics registers are created and initialized.
ctrl | The address of the LRA control block |
LRA_SUCCESS | Success | |
LRA_INSFMEM | Not enough memory |
References addListItem(), _LRA_sregData::aemCrStat, _LRA_sregData::aemFbStat, _LRA_sregData::aemStatus, _LRA_sregData::aemTrgStat, _LRA_sregData::cccStatus, _LRA_sregData::cruCrStat, _LRA_sregData::ebmAemER, _LRA_sregData::ebmCrStat, _LRA_sregData::ebmEpu0ER, _LRA_sregData::ebmEpu0ES, _LRA_sregData::ebmEpu1ER, _LRA_sregData::ebmEpu1ES, _LRA_sregData::ebmEpu2ER, _LRA_sregData::ebmEpu2ES, _LRA_sregData::ebmGemER, _LRA_sregData::ebmSiu0ER, _LRA_sregData::ebmSiu0ES, _LRA_sregData::ebmSiu1ER, _LRA_sregData::ebmSiu1ES, _LRA_sregData::ebmSiueER, _LRA_sregData::ebmSiueES, _LRA_sregData::ebmSsrES, _LRA_sregData::ebmTem0ER, _LRA_sregData::ebmTem1ER, _LRA_control::ebmTemMuxCi, _LRA_sregData::gemCrStat, _LRA_sregData::gemDeadZone, _LRA_sregData::gemDiscard, _LRA_sregData::gemEvStat, _LRA_sregData::gemLivetime, _LRA_sregData::gemPrescale, _LRA_sregData::gemSent, _LRA_sregData::gemTimebase, LRA_MAX_CRL, LRA_N_CCC, LRA_N_TCC, LRA_N_TEM, newCrl(), _LRA_sregData::pdu0CrStat, _LRA_sregData::pdu1CrStat, _LRA_control::sCrl, _LRA_control::srData, _LRA_sregData::tccStatus, _LRA_sregData::temCrStat, _LRA_sregData::temStatus, and _LRA_sregData::ticStatus.
Referenced by LRA_initialize().
unsigned LRA_process | ( | void * | prm, | |
const ITC_QueueItem * | qItem, | |||
void * | pay, | |||
unsigned | len | |||
) |
Process a received request.
This routine runs within the LRA task and handles the queued raw requests for service.
prm | User parameter (not used) | |
qItem | The address of the queue item (not used) | |
pay | The address of the request payload | |
len | The length of the request payload (not used) |
LRA_INVFCODE | The received function code was invalid |
References LRA_doSend(), LRA_doSendEsr(), LRA_doSendStats(), LRA_FNC_SEND, LRA_FNC_SENDESR, and LRA_FNC_SENDSTATS.
Referenced by LRA_initialize().
unsigned LRA_updateStats | ( | LRA_control * | ctrl, | |
int | clear | |||
) |
Update the register statistics.
The statistics registers are read (and reset). Normally the counters in the stats block are then updated using the read values, but if there is a time discontinuity or the clear option is specified, the counters are cleared instead.
ctrl | The address of the LRA control block | |
clear | If TRUE, the counters are cleared instead of being updated. |
LRA_SUCCESS | Success always |
References decodeData(), _LRA_control::ebmTem0, _LRA_control::ebmTem1, _LRA_control::ebmTemMask, _LRA_control::ebmTemMuxCi, _LRA_stats::endTime, findNextSet16(), _LRA_control::lastTem0, _LRA_control::lastTem1, LRA_N_TEM, LRA_STATS_MAJOR, LRA_STATS_MINOR, _LRA_control::nextTemMask, _LRA_stats::nFail, _LRA_stats::nRead, _LRA_stats::resetTime, _LRA_control::sCrl, _LRA_control::srData, _LRA_stats::startTime, _LRA_control::statMtx, _LRA_control::stats, updateStats(), and _LRA_stats::version.
Referenced by LRA_clearStats(), LRA_startStats(), and procUpdate().