GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-5 > eds / mv2304
#include <EDS/EDR_errUnpack.h>
#include <EDS/EDR_err.h>
#include <EDS/EBF_err.h>
#include <EDS/EBF_dir.h>
#include <EDS/EBF_tem.h>
#include <EDS/EBF_ctb.h>
#include <EDS/EBF_cid.h>
#include <PBI/FFS.ih>
Defines | |
#define | dprintf(format,...) |
#define | declare(statement) |
Functions | |
static __inline int | edr_err_gccc_status_compose (int reason, int cc, int rc, int idx) |
Convenience function to compose a EDR_errGCCCStatus word. | |
static __inline int | edr_err_gtcc_status_compose (int reason, int cc, int rc, int idx) |
Convenience function to compose a EDR_errGTCCStatus word. | |
static __inline int | edr_err_cal_parse (EDR_errCal *cal, unsigned int mask, const unsigned short int *err, int curStatus, int max) |
Unpacks the CAL error contribution. | |
static __inline int | edr_err_tkr_parse (EDR_errTkr *tkr, unsigned int mask, const unsigned short int *err, int curStatus, int max) |
Unpacks the TKR error contribution. | |
static __inline int | edr_err_tem_phase_parse (EDR_errTemPhase *phase, const unsigned short int *err, int curStatus, int max) |
Unpacks the TEM PHASE error contribution. | |
static __inline int | edr_err_tem_timeout_parse (EDR_errTemTimeout *timeout, const unsigned short int *err, int curStatus, int max) |
Unpacks the TEM PHASE error contribution. | |
static __inline int | edr_err_tem_parse (EDR_errTem *tem, const unsigned short int *err, int max) |
Produces a formatted dump of the error record. | |
int | EDR_errUnpack (EDR_err *err, const EBF_dir *dir, unsigned int map) |
Unpacks the error records for the components specified by map of TEMs. | |
int | EDR_errUnpackInit (EDR_err *err) |
One-time initialization an EDR_err structure. | |
void | EDR_errUnpackReset (EDR_err *err) |
Resets the EDR_err structure, preparing it for a new event. | |
int | EDR_errUnpackSizeof (void) |
Returns the size, in bytes, of a ERR LAT record. |
CVS $Id: EDR_errUnpack.c,v 1.2 2011/03/25 22:16:56 russell Exp $
static __inline int edr_err_cal_parse | ( | EDR_errCal * | cal, | |
unsigned int | calMask, | |||
const unsigned short int * | err, | |||
int | curStatus, | |||
int | max | |||
) | [static] |
Unpacks the CAL error contribution.
cal | The data structure to receive the parsed data | |
calMask | The bit vector of which cable controls are in error | |
err | The beginning of the error record | |
curStatus | The current status of the decode. This includes the index to beginning of the CAL error record and the decoding status. This routine augments the decoding status and the index and returns this value. | |
max | The maximum index |
References _EDR_errCalStatus_bf::aborted, _EBF_errGCCC::bf, _EDR_errCalStatus::bf, _EDR_errCalStatus_bf::cc, _EDR_errCalStatus_bf::cc_err, _EDR_errStatus::ci, EDR_ERR_CAL_REASON_K_ILLWC, EDR_ERR_CAL_REASON_K_OVRRUN, EDR_ERR_COMPONENT_K_CAL, EDR_ERR_GCCC_REASON_K_MBZ, EDR_ERR_GCCC_REASON_K_TYPE, edr_err_gccc_status_compose(), _EDR_errCal::gcccs, _EBF_errGCCC_bf::gcrcs, _EDR_errCalStatus_bf::idx, _EDR_errCal::mask, _EBF_errGCCC_bf::mbz, _EDR_errCal::msgs, _EDR_errCalStatus_bf::reason, _EDR_errGCCCStatus::si, _EDR_errStatus::si, _EDR_errCalStatus::si, _EDR_errCal::status, _EBF_errGCCC_bf::sweep, _EBF_errGCCC_bf::type, and _EBF_errGCCC::us.
Referenced by edr_err_tem_parse().
static __inline int edr_err_gccc_status_compose | ( | int | reason, | |
int | cc, | |||
int | rc, | |||
int | idx | |||
) | [static] |
Convenience function to compose a EDR_errGCCCStatus word.
reason | The reason for the error, see EDR_ERR_GCCC_REASON_K, | |
cc | The offending cable controller | |
rc | The offending readout controller | |
idx | The 16-bit word index of the offending word |
References _EDR_errGCCCStatus::bf, _EDR_errGCCCStatus_bf::cc, _EDR_errGCCCStatus_bf::idx, _EDR_errGCCCStatus_bf::rc, _EDR_errGCCCStatus_bf::reason, _EDR_errGCCCStatus_bf::rsvd, and _EDR_errGCCCStatus::si.
Referenced by edr_err_cal_parse().
static __inline int edr_err_gtcc_status_compose | ( | int | reason, | |
int | cc, | |||
int | rc, | |||
int | idx | |||
) | [static] |
Convenience function to compose a EDR_errGTCCStatus word.
reason | The reason for the error, see EDR_ERR_GTCC_REASON_K, | |
cc | The offending cable controller | |
rc | The offending readout controller | |
idx | The 16-bit word index of the offending word |
References _EDR_errGTCCStatus::bf, _EDR_errGTCCStatus_bf::cc, _EDR_errGTCCStatus_bf::idx, _EDR_errGTCCStatus_bf::rc, _EDR_errGTCCStatus_bf::reason, _EDR_errGTCCStatus_bf::rsvd, and _EDR_errGTCCStatus::si.
Referenced by edr_err_tkr_parse().
static __inline int edr_err_tem_parse | ( | EDR_errTem * | tem, | |
const unsigned short int * | err, | |||
int | max | |||
) | [static] |
Produces a formatted dump of the error record.
tem | The structure to receive the unpacked data for this tem | |
err | The error source data record | |
max | The length, in 16-bit words of the err |
References _EBF_errTemSummary::bf, _EDR_errTem::cal, _EBF_errTemSummary_bf::cal, EDR__errStatusIsAbort(), edr_err_cal_parse(), edr_err_tem_phase_parse(), edr_err_tem_timeout_parse(), edr_err_tkr_parse(), _EDR_errTem::esum, _EDR_errTemSummary::msg, _EDR_errTem::phase, _EBF_errTemSummary_bf::phase, _EDR_errTem::rec, _EDR_errStatus::si, _EDR_errTem::timeout, _EBF_errTemSummary_bf::timeout, _EDR_errTem::tkr, _EBF_errTemSummary_bf::tkr, and _EBF_errTemSummary::us.
Referenced by EDR_errUnpack().
static __inline int edr_err_tem_phase_parse | ( | EDR_errTemPhase * | phase, | |
const unsigned short int * | err, | |||
int | curStatus, | |||
int | max | |||
) | [static] |
Unpacks the TEM PHASE error contribution.
phase | The data structure to receive the parsed data | |
err | The beginning of the error record | |
curStatus | The current status of the decode. This includes the index to beginning of the PHASE error record and the decoding status. This routine augments the decoding status and the index and returns this value. | |
max | The maximum index |
References _EDR_errTemPhaseStatus_bf::aborted, _EDR_errTemPhaseStatus::bf, _EDR_errStatus::ci, _EDR_errTemPhaseStatus_bf::component, EDR_ERR_COMPONENT_K_TEM_PHASE, EDR_ERR_TEM_PHASE_REASON_K_OVRRUN, _EDR_errTemPhase::idx, _EDR_errTemPhaseStatus_bf::idx, _EDR_errTemPhaseStatus_bf::l0_err, _EDR_errTemPhase::msg, _EDR_errTemPhaseStatus_bf::reason, _EDR_errTemPhaseStatus::si, _EDR_errStatus::si, _EDR_errTemPhase::status, and _EBF_errTemPhase::us.
Referenced by edr_err_tem_parse().
static __inline int edr_err_tem_timeout_parse | ( | EDR_errTemTimeout * | timeout, | |
const unsigned short int * | err, | |||
int | curStatus, | |||
int | max | |||
) | [static] |
Unpacks the TEM PHASE error contribution.
timeout | The data structure to receive the parsed data | |
err | The beginning of the error record | |
curStatus | The current status of the decode. This includes the index to beginning of the PHASE error record and the decoding status. This routine augments the decoding status and the index and returns this value. | |
max | The maximum index |
References _EDR_errTemTimeoutStatus_bf::aborted, _EBF_errTemTimeout::bf, _EDR_errTemTimeoutStatus::bf, _EDR_errStatus::ci, _EDR_errTemTimeoutStatus_bf::component, EDR_ERR_COMPONENT_K_TEM_TIMEOUT, EDR_ERR_TEM_TIMEOUT_REASON_K_MBZ, EDR_ERR_TEM_TIMEOUT_REASON_K_NOERR, EDR_ERR_TEM_TIMEOUT_REASON_K_OVRRUN, _EDR_errTemTimeout::idx, _EDR_errTemTimeoutStatus_bf::idx, _EDR_errTemTimeoutStatus_bf::l0_err, _EBF_errTemTimeout_bf::mbz, _EDR_errTemTimeout::msg, _EDR_errTemTimeoutStatus_bf::reason, _EDR_errTemTimeoutStatus::si, _EDR_errStatus::si, _EDR_errTemTimeout::status, and _EBF_errTemTimeout::us.
Referenced by edr_err_tem_parse().
static __inline int edr_err_tkr_parse | ( | EDR_errTkr * | tkr, | |
unsigned int | mask, | |||
const unsigned short int * | err, | |||
int | curStatus, | |||
int | max | |||
) | [static] |
Unpacks the TKR error contribution.
tkr | The data structure to receive the parsed data | |
mask | The bit vector of which cable controls are in error | |
err | The beginning of the error record | |
curStatus | The current status of the decode. This includes the index to beginning of the TKR error record and the decoding status. This routine augments the decoding status and the index and returns this value. | |
max | The maximum index |
References _EDR_errTkrStatus_bf::aborted, _EBF_errGTRC::bf, _EDR_errTkrStatus::bf, _EDR_errTkrStatus_bf::cc, _EDR_errTkrStatus_bf::cc_err, _EDR_errStatus::ci, EBF__errGTRCStackCount(), EBF_ERR_GTCC_K_MAX_WC, EDR_ERR_COMPONENT_K_TKR, EDR_ERR_GTCC_REASON_K_BADRC, EDR_ERR_GTCC_REASON_K_NOERR, EDR_ERR_GTCC_REASON_K_ORDERRC, EDR_ERR_GTCC_REASON_K_OVRFLW, edr_err_gtcc_status_compose(), EDR_ERR_TKR_REASON_K_ILLWC, EDR_ERR_TKR_REASON_K_OVRRUN, _EDR_errTkr::esum, _EDR_errGTCC::esum, _EDR_errTkr::gtccs, _EDR_errGTCC::gtrcs, _EBF_errGTRC_bf::id, _EDR_errGTRC::idx, _EDR_errTkrStatus_bf::idx, _EDR_errGTCC::idx, _EDR_errTkrStatus_bf::rc_err, _EDR_errGTCC::rcs, _EDR_errTkrStatus_bf::reason, _EDR_errGTCCStatus::si, _EDR_errStatus::si, _EDR_errTkrStatus::si, _EDR_errTkr::status, _EDR_errGTCC::status, _EBF_errGTRC::us, and _EDR_errTkr::valid.
Referenced by edr_err_tem_parse().
Unpacks the error records for the components specified by map of TEMs.
err | The error context block to compose | |
dir | The target directory structure | |
map | The map of components to unpacke |
References _EBF_dir::auxs, _EDR_err::bad_ids, _EBF_errTemTimeout::bf, _EBF_errTemSummary::bf, _EDR_err::blk_ids, _EBF_errTemTimeout_bf::cal, _EBF_errTemSummary_bf::cal, _EDR_errStatus::ci, _EDR_errTem::cnt, _EDR_err::ct_ids, _EBF_dirCtbDsc::ctb, _EBF_dir::ctbs, _EBF_dirRedux::dgn_ids, EBF__ctbSequence(), EBF__ctbSize(), EBF__dirCtbTkrLocate(), EBF__errLocate(), EBF_CID_K_GEM, EDR__errStatusIsAbort(), EDR_ERR_COMPONENT_K_CAL, EDR_ERR_COMPONENT_K_TKR, edr_err_tem_parse(), _EBF_dirRedux::err_ids, _EDR_errTem::esum, _EDR_errTemTimeout::msg, _EDR_errTemSummary::msg, _EDR_err::pe_ids, _EBF_errTemSummary_bf::phase, _EBF_dir::redux, _EDR_err::sequence, _EDR_errStatus::si, _EDR_err::tem_ids, _EDR_err::tems, _EDR_errTem::timeout, _EBF_errTemSummary_bf::timeout, _EBF_errTemTimeout_bf::tkr, _EBF_errTemSummary_bf::tkr, _EBF_dirAuxDsc::tkrLen, and _EDR_err::to_ids.
int EDR_errUnpackInit | ( | EDR_err * | err | ) |
One-time initialization an EDR_err structure.
err | The EDR_err structure to initialize |
References _EDR_err::tem_ids, and _EDR_err::tems.
Referenced by initIxbObjTbl().
void EDR_errUnpackReset | ( | EDR_err * | err | ) |
Resets the EDR_err structure, preparing it for a new event.
err | The EDR_err structure to reset |
References _EDR_err::tem_ids.
Referenced by initIxbObjTbl().
int EDR_errUnpackSizeof | ( | void | ) |
Returns the size, in bytes, of a ERR LAT record.
After allocating an EDR_err structure, the structure should be initialized using EDR_errUnpackInit().