GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LRA / V5-2-4 > lra / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LRA_p.h File Reference

Private definitions for the register access routines. More...

#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.


Detailed Description

Private definitions for the register access routines.

Author:
Owen H Saxton
$Id: LRA_p.h,v 1.14 2011/03/28 16:14:05 saxton Exp $

Enumeration Type Documentation

Function codes.

Enumerator:
LRA_FNC_READ  Read registers.
LRA_FNC_LOAD  Load registers.
LRA_FNC_CONTROL  Perform control (dataless) operation.
LRA_FNC_SEND  Send registers on science interface.
LRA_FNC_SENDESR  Send ESR data on science interface.
LRA_FNC_SENDSTATS  Send statistics data on science interface.

GEM counter register widths.

Enumerator:
LRA_GCW_TIMEBASE  Timebase.
LRA_GCW_LIVETIME  Livetime.
LRA_GCW_PRESCALE  Prescaled.
LRA_GCW_DISCARD  Discarded.
LRA_GCW_SENT  Sent.
LRA_GCW_DEADZONE  Deadzoned.

enum _LRA_miscP

Miscellaneous private constants.

Enumerator:
LRA_NUM_RQSTS  Number of available request packets.
LRA_NUM_UPDATE  Number of available update request packets.
LRA_NUM_PKTS  Number of diagnostic packets in pool.
LRA_MAX_DATA  Maximum diagnostic data size.
LRA_NUM_DGMS  Number of science datagrams in pool.
LRA_MAX_CNTRL  Maximum value of control function.
LRA_MAX_CRL  Maximum number of items in a C/R list.
LRA_CTR_OFLOW  Saturating counter overflow value.
LRA_DFLT_PRD  Default statistics update period (1/100 sec).
LRA_DFLT_TEMS  Default mask of TEMs RCV stats to sample.


Function Documentation

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.

Parameters:
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.
Return values:
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.

Parameters:
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.
Return values:
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.

Parameters:
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
Return values:
LRA_SUCCESS The operation was successful
LRA_INVCMPT Invalid component number
LRA_INVTEM Invalid TEM number
LCBD_RTOERR Operation timed out

References LRA_N_TEM, and NELEM.

Referenced by LRA_lam(), and LRA_LAM().

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.

Parameters:
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
Return values:
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.

Parameters:
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.
Return values:
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.

Parameters:
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.
Return values:
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.

Parameters:
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
Return 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.

Parameters:
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.
Return values:
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.

Return values:
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.

Return values:
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.

Parameters:
ctrl The address of the LRA control block
Return values:
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.

Parameters:
ctrl The address of a pointer to receive the address of the control structure.
Return values:
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  ) 

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.

Parameters:
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)
Returns:
The return status from the processing
Return values:
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.

Parameters:
ctrl The address of the LRA control block
clear If TRUE, the counters are cleared instead of being updated.
Return values:
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().


Generated on Wed Nov 21 20:40:32 2012 by  doxygen 1.5.8