GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCM / dev > lcm_siu / rhel4-32
#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <MDB/MDB_pubdefs.h>
#include <PBS/FPA.h>
#include <PBS/MBA.h>
#include <PBS/WUT.h>
#include <LCM/LCM_msgs.h>
#include <LCM/LCM_tlmdefs.h>
#include <LCM_prvdefs.h>
Typedefs | |
typedef enum _LCM_PacketCount | LCM_PacketCount |
Typedef for enum _LCM_PacketCount. | |
Enumerations | |
enum | _LCM_PacketCount { LCM_L_MEMERR_PKT = 128, LCM_L_PCIERR_PKT = 128 } |
Enumeration of telemetry packet allocation counts. More... | |
Functions | |
static void | memPacketInit (void *prm, void *pkt, int siz, int off) |
Initialize memory error reporting packets. | |
static void | pciPacketInit (void *prm, void *pkt, int siz, int off) |
Initialize PCI error reporting packets. | |
static void | packetFree (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx) |
An ITC completion routine to free a queue item after use. | |
static void | packetInitialize (LCM_Control *ctl, void *pkt, FPA_fcb *fcb, unsigned int qilen, unsigned int apid) |
Initialize error reporting packets (both memory and PCI). | |
unsigned int | LCM_ErrorCfg (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LLCMERRORCFG command. | |
unsigned int | LCM_ScrubCfg (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LLCMSCRUBCFG command. | |
unsigned int | LCM_scrubInitialize (LCM_Control *ctl) |
Initialize the LCM memory scrubbing subsystem. | |
unsigned int | LCM_ScrubRun (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Callback function for the LLCMSCRUBRUN command. | |
WUT_cb_status | LCM_scrubTimer (LCM_Control *ctl, WUT_tmr *timer) |
Callback for the memory scrub timer. |
CVS $Id: LCM_scrub.c,v 1.5 2011/03/29 21:59:34 apw Exp $
enum _LCM_PacketCount |
unsigned int LCM_ErrorCfg | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Callback function for the LLCMERRORCFG command.
prm | (in) User context parameter | |
qitem | (in) Queue item | |
pay | (in) Payload pointer | |
len | (in) Payload length |
ITC_FORWARD | If command is forwarded to another node | |
LCM_ECMDPARM | Error in command parameters | |
LCM_SUCCESS | Success |
References _LCM_NODEPAD::bf, _LCM_Control::cmd_hdr_size, _LCM_ErrorCfg_Prm::errClass, _LCM_ErrorCfg_Prm::errLevel, _LCM_ErrorCfg_Prm::flag, LCM_LCMERRCLASS_LCMECLMEC, LCM_LCMERRCLASS_LCMECLMEU, LCM_LCMERRCLASS_LCMECLPCI, LCM_LCMERRLEVEL_LCMLEVCRI, _LCM_Control::node_id, and _LCM_Control::pci_err_level.
unsigned int LCM_ScrubCfg | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Callback function for the LLCMSCRUBCFG command.
prm | (in) User context parameter | |
qitem | (in) Queue item | |
pay | (in) Payload pointer | |
len | (in) Payload length |
ITC_FORWARD | If command is forwarded to another node | |
LCM_SUCCESS | Success |
References _LCM_NODEPAD::bf, _LCM_Control::cmd_hdr_size, _LCM_ScrubCfg_Prm::flag, LCM_scrubTimer(), _LCM_Control::node_id, _LCM_ScrubCfg_Prm::period, _LCM_Control::scrub_period, and _LCM_Control::scrub_timer.
unsigned int LCM_scrubInitialize | ( | LCM_Control * | ctl | ) |
Initialize the LCM memory scrubbing subsystem.
ctl | (in) LCM control block |
LCM_ALOCFAIL | Memory allocation failed | |
LCM_FPAINIT | FPA initialization failed | |
LCM_SCRTIMFL | Timer allocation failed | |
LCM_SUCCESS | Success |
References LCM_L_MEMERR_PKT, LCM_L_PCIERR_PKT, LCM_LCMERRLEVEL_LCMLEVDIA, _LCM_Control::mem, _LCM_Control::memc_err_count, memPacketInit(), _LCM_Control::memu_err_count, _LCM_Control::pci, _LCM_Control::pci_err_count, _LCM_Control::pci_err_level, pciPacketInit(), and _LCM_Control::scrub_timer.
Referenced by LCM_initialize().
unsigned int LCM_ScrubRun | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Callback function for the LLCMSCRUBRUN command.
prm | (in) User context parameter | |
qitem | (in) Queue item | |
pay | (in) Payload pointer | |
len | (in) Payload length |
ITC_FORWARD | If command is forwarded to another node | |
LCM_SUCCESS | Success |
References _LCM_NODEPAD::bf, _LCM_Control::cmd_hdr_size, _LCM_ScrubRun_Prm::flag, LCM_scrubMemAuto(), and _LCM_Control::node_id.
WUT_cb_status LCM_scrubTimer | ( | LCM_Control * | ctl, | |
WUT_tmr * | timer | |||
) |
Callback for the memory scrub timer.
ctl | (in) LCM control block | |
timer | (in) WUT timer |
References LCM_scrubMemAuto(), and _LCM_Control::scrub_period.
Referenced by LCM_ScrubCfg(), and LCM_scrubTaskInitialize().
static void memPacketInit | ( | void * | prm, | |
void * | pkt, | |||
int | siz, | |||
int | off | |||
) | [static] |
Initialize memory error reporting packets.
prm | (in) User parameter (the memory error FPA control block) | |
pkt | (in) Packet pointer | |
siz | (in) Packet size (unused) | |
off | (in) Offset to packet control structure (unused) |
References LCM_MEMORYERROR_TLM_APID, _LCM_Control::mem, and packetInitialize().
Referenced by LCM_scrubInitialize().
static void packetFree | ( | ITC_QueueItem * | qitem, | |
unsigned int | status, | |||
void * | prm0, | |||
void * | prm1, | |||
void * | prm2, | |||
unsigned int | tx | |||
) | [static] |
An ITC completion routine to free a queue item after use.
qitem | (in) Queue item | |
status | (in) Status from ITC | |
prm0 | (in) User param 0 (the FPA control block) | |
prm1 | (in) User param 1 (unused) | |
prm2 | (in) User param 2 (unused) | |
tx | (in) Failure during send phase of ITC_send() (unused) |
Referenced by packetInitialize().
static void packetInitialize | ( | LCM_Control * | ctl, | |
void * | pkt, | |||
FPA_fcb * | fcb, | |||
unsigned int | qilen, | |||
unsigned int | apid | |||
) | [static] |
Initialize error reporting packets (both memory and PCI).
ctl | (in) LCM control block | |
pkt | (in) Packet pointer | |
fcb | (in) FPA control block | |
qilen | (in) Packet length | |
apid | (in) Packet APID |
References packetFree(), and _LCM_Control::telem_hdr_size.
Referenced by memPacketInit(), and pciPacketInit().
static void pciPacketInit | ( | void * | prm, | |
void * | pkt, | |||
int | siz, | |||
int | off | |||
) | [static] |
Initialize PCI error reporting packets.
prm | (in) User parameter (the PCI error FPA control block) | |
pkt | (in) Packet pointer | |
siz | (in) Packet size (unused) | |
off | (in) Offset to packet control structure (unused) |
References LCM_PCIERROR_TLM_APID, packetInitialize(), and _LCM_Control::pci.
Referenced by LCM_scrubInitialize().