GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MEM / V5-8-2 > mem / sun-gcc
#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ITC/ITC_pubdefs.h>
#include <LSF/LSF.h>
#include <LSF/LSF_ids.h>
#include <MSG/MSG_pubdefs.h>
#include <MEM/MEM_apid.h>
#include <MEM/MEM_cmddefs.h>
#include <MEM/MEM_dump.h>
#include <MEM/MEM_load.h>
#include <MEM/MEM_msgs.h>
#include <MEM/MEM_tlmdefs.h>
#include <MEM/QMEM.h>
#include <PBS/MBA.h>
#include <PBS/WCT.h>
#include <PBS/WUT.h>
#include <MEM_control.h>
Defines | |
#define | MEM_DUMP_PKT_PERIOD_USEC (250000) |
Period of memory dump packets, in microseconds. | |
Functions | |
static unsigned int | mem_check_state (MEM_Control *mem_p) |
Verify that MEM system is in proper state to handle commands. | |
static unsigned int | mem_forward_cmd (MEM_Control *mem_p, const ITC_QueueItem *qitem_p, void *pkt_p, unsigned int len, int *fwd_p) |
Common function to forward MEM commands to other nodes. | |
static void | mem_fpa_free (ITC_QueueItem *qitem_p, unsigned int status, void *parm_0, void *parm_1, void *parm_2, unsigned int tx) |
ITC callback to free FPA memory. | |
static unsigned int | mem_fpa_get (MEM_Control *mem_p, ITC_QueueItem **qitem_pp, char *desc) |
Allocate an ITC queue item from an FPA pool. | |
static unsigned int | mem_send_pool_data (MEM_Control *mem_p, unsigned int pool_id, unsigned int tran_id) |
Send memory pool statistics telemetry. | |
static unsigned int | mem_send_dump_next_cmd (MEM_Control *mem_p) |
Send the LMEMDUMPNEXT command. | |
static WUT_cb_status | mem_wut_handler (void *prm, WUT_tmr *wut) |
Callback routine for the Memory Dump wake-up timer. | |
static void | mem_free_dump_pkt (ITC_QueueItem *qitem_p, unsigned int status_in, void *parm_0_in, void *parm_1_in, void *parm_2_in, unsigned int tx) |
ITC callback to free a dump telemetry packet. | |
static unsigned int | mem_build_dump_data_1553 (MEM_Control *mem_p, ITC_QueueItem **qitem_pp) |
Build a memory dump data telemetry packet to send to the 1553. | |
static unsigned int | mem_build_dump_data_ssr (MEM_Control *mem_p, ITC_QueueItem **qitem_pp) |
Build a memory dump data telemetry packet to send to the SSR. | |
static unsigned int | mem_build_dump_data (MEM_Control *mem_p, ITC_QueueItem **qitem_pp) |
Build a memory dump data telemetry packet. | |
static unsigned int | mem_send_dump_data (MEM_Control *mem_p, ITC_QueueItem *qitem_p) |
Send a memory dump data telemetry packet. | |
static unsigned int | mem_handle_dump (MEM_Control *mem_p, const ITC_QueueItem *qitem_p, void *pkt_p, unsigned int len, unsigned int min_len, unsigned int fcode_orig, unsigned int tran_id, ITC_NodeID dest_nid) |
Common Memory Dump command handling. | |
unsigned int | MEM_LMEMDUMPMEM (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Memory Data Dump command. | |
unsigned int | MEM_LMEMDUMPCANCEL (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Memory Dump Cancel command. | |
unsigned int | MEM_LMEMDUMPPCI (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the PCI Device Header Dump telecommand. | |
unsigned int | MEM_LMEMDUMPREG (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Processor Register Dump telecommand. | |
unsigned int | MEM_LMEMDUMPPOOL (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Memory Pool Status Dump telecommand. | |
unsigned int | MEM_LMEMDUMPSYMREL (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Memory Dump Symbol Relative telecommand. | |
unsigned int | MEM_LMEMDUMPSYMVAL (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Memory Symbol Lookup telecommand. | |
unsigned int | MEM_LMEMDUMPNEXT (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Dump-Next telecommand. | |
static unsigned int | mem_handle_load (MEM_Control *mem_p) |
Common Memory Write command handling. | |
unsigned int | MEM_LMEMLOADMEM (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Memory Write command. | |
unsigned int | MEM_LMEMLOADPCI (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the PCI Device Header Write telecommand. | |
unsigned int | MEM_LMEMLOADREG (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Processor Register Write telecommand. | |
unsigned int | MEM_LMEMNOOP (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len) |
Handle the Memory No-Op command. |
CVS $Id: MEM_command.c,v 1.29 2011/03/29 01:58:52 apw Exp $
Application-level handlers for the MEM dump and load commands. These handlers simply forward the commands to a target node.
unsigned int mem_build_dump_data | ( | MEM_Control * | mem_p, | |
ITC_QueueItem ** | qitem_pp | |||
) | [static] |
Build a memory dump data telemetry packet.
mem_p | Pointer to MEM control block. | |
qitem_pp | Location to return pointer to packet queue item. |
References _MEM_Control::dump_dest_nid, mem_build_dump_data_1553(), and mem_build_dump_data_ssr().
Referenced by mem_handle_dump(), and MEM_LMEMDUMPNEXT().
unsigned int mem_build_dump_data_1553 | ( | MEM_Control * | mem_p, | |
ITC_QueueItem ** | qitem_pp | |||
) | [static] |
Build a memory dump data telemetry packet to send to the 1553.
mem_p | Pointer to MEM control block. | |
qitem_pp | Location to return pointer to packet queue item. |
References _MEM_LMEMSIUDATA_Tlm::address, _MEM_TIDBF::bf, _MEM_LMEMSIUDATA_Tlm::cmdFuncCode, _MEM_LMEMSIUDATA_Tlm::data, _MEM_Control::dump_active, _MEM_Control::dump_dest_nid, _MEM_Control::dump_fcode, _MEM_Control::dump_first, _MEM_Control::dump_handle, _MEM_Control::dump_tran_id, _MEM_LMEMSIUDATA_Tlm::hdr, _MEM_LMEMSIUDATA_Tlm::idents, MEM_dumpGetData(), MEM_dumpGetInfo(), mem_fpa_free(), mem_fpa_get(), mem_free_dump_pkt(), MEM_LMEMEPU0DATA_TLM_APID, MEM_LMEMEPU1DATA_TLM_APID, MEM_LMEMEPU2DATA_TLM_APID, MEM_LMEMSIUDATA_TLM_APID, _MEM_Control::my_nid, _MEM_LMEMSIUDATA_Tlm::wordCount, and _MEM_DumpInfo::wrapped.
Referenced by mem_build_dump_data().
unsigned int mem_build_dump_data_ssr | ( | MEM_Control * | mem_p, | |
ITC_QueueItem ** | qitem_pp | |||
) | [static] |
Build a memory dump data telemetry packet to send to the SSR.
mem_p | Pointer to MEM control block. | |
qitem_pp | Location to return pointer to packet queue item. |
References _QMEM_Dump_Desc::address, _MEM_SDI_Tlm::data, _QMEM_Dump_Datagram::data_hdr, _QMEM_Dump_Datagram::desc, _QMEM_Dump_Datagram::desc_hdr, _QMEM_Dump_Datagram::dgm_hdr, _MEM_Control::dump_active, _MEM_Control::dump_dest_nid, _MEM_Control::dump_fcode, _MEM_Control::dump_first, _MEM_Control::dump_handle, _MEM_Control::dump_tran_id, _MEM_LMEMSSRSDATA_Tlm::hdr, _MEM_SDI_Tlm::hdr, _QMEM_Dump_Desc::idents, MEM_dumpGetData(), MEM_dumpGetInfo(), mem_fpa_free(), mem_fpa_get(), mem_free_dump_pkt(), MEM_LMEMSSR0DATA_TLM_APID, MEM_LMEMSSR1DATA_TLM_APID, MEM_LMEMSSR2DATA_TLM_APID, MEM_LMEMSSRSDATA_TLM_APID, _MEM_Control::my_nid, QMEM_ID_DATA, QMEM_ID_DESC, QMEM_VERSION_DATA, QMEM_VERSION_DESC, QMEM_VERSION_DGM, and _MEM_DumpInfo::wrapped.
Referenced by mem_build_dump_data().
unsigned int mem_check_state | ( | MEM_Control * | mem_p | ) | [static] |
Verify that MEM system is in proper state to handle commands.
This function checks the state of the MEM system to determine if it has been initialized.
mem_p | Pointer to MEM control block. |
References MEM_STATE_INITIALIZED, and _MEM_Control::state.
Referenced by mem_handle_dump(), MEM_LMEMDUMPCANCEL(), MEM_LMEMDUMPNEXT(), MEM_LMEMDUMPPOOL(), MEM_LMEMDUMPSYMREL(), MEM_LMEMDUMPSYMVAL(), MEM_LMEMLOADMEM(), MEM_LMEMLOADPCI(), MEM_LMEMLOADREG(), and MEM_LMEMNOOP().
unsigned int mem_forward_cmd | ( | MEM_Control * | mem_p, | |
const ITC_QueueItem * | qitem_p, | |||
void * | pkt_p, | |||
unsigned int | len, | |||
int * | fwd_p | |||
) | [static] |
Common function to forward MEM commands to other nodes.
This function looks at a MEM telecommand packet and determines if it should be forwarded to another node (CPU). It assumes that the ID of the target node is located in the same place within all MEM telecommand packets.
mem_p | Pointer to MEM control block. | |
qitem_p | Pointer to telecommand queue item. | |
pkt_p | Pointer to telecommand packet. | |
len | Length of telecommand packet, in bytes. | |
fwd_p | Location to store pkt disposition (nonzero=>forwarded). |
References _MEM_Control::my_nid.
Referenced by mem_handle_dump(), MEM_LMEMDUMPCANCEL(), MEM_LMEMDUMPNEXT(), MEM_LMEMDUMPPOOL(), MEM_LMEMDUMPSYMREL(), MEM_LMEMDUMPSYMVAL(), MEM_LMEMLOADMEM(), MEM_LMEMLOADPCI(), MEM_LMEMLOADREG(), and MEM_LMEMNOOP().
void mem_fpa_free | ( | ITC_QueueItem * | qitem_p, | |
unsigned int | status, | |||
void * | parm_0, | |||
void * | parm_1, | |||
void * | parm_2, | |||
unsigned int | tx | |||
) | [static] |
ITC callback to free FPA memory.
qitem_p | Pointer to packet's queue item. | |
status | Status of packet transmission. | |
parm_0 | Callback parameter 0 (pointer to MEM control block). | |
parm_1 | Callback parameter 1 (pointer to FPA packet). | |
parm_2 | Callback parameter 2 (unused). | |
tx | Flag indicating sender-side failure (unused). |
References _MEM_Control::pkt_fcb_p, and _MEM_Control::pkt_in_use.
Referenced by mem_build_dump_data_1553(), mem_build_dump_data_ssr(), mem_free_dump_pkt(), MEM_LMEMDUMPSYMVAL(), mem_send_dump_data(), mem_send_dump_next_cmd(), and mem_send_pool_data().
ITC_QueueItem * mem_fpa_get | ( | MEM_Control * | mem_p, | |
ITC_QueueItem ** | qitem_pp, | |||
char * | desc | |||
) | [static] |
Allocate an ITC queue item from an FPA pool.
mem_p | Pointer to MEM control block. | |
qitem_pp | Location to return pointer to allocated queue item. | |
desc | Description of the queue item. |
References _MEM_Control::pkt_fcb_p, and _MEM_Control::pkt_in_use.
Referenced by mem_build_dump_data_1553(), mem_build_dump_data_ssr(), MEM_LMEMDUMPSYMVAL(), mem_send_dump_next_cmd(), and mem_send_pool_data().
void mem_free_dump_pkt | ( | ITC_QueueItem * | qitem_p, | |
unsigned int | status_in, | |||
void * | parm_0_in, | |||
void * | parm_1_in, | |||
void * | parm_2_in, | |||
unsigned int | tx | |||
) | [static] |
ITC callback to free a dump telemetry packet.
qitem_p | Pointer to packet's queue item. | |
status_in | Status of packet transmission. | |
parm_0_in | Callback parameter 0 (pointer to MEM control block). | |
parm_1_in | Callback parameter 1 (pointer to FPA packet). | |
parm_2_in | Callback parameter 2 (unused). | |
tx | Flag indicating sender-side failure. |
References _MEM_Control::max_dump_pkts, mem_fpa_free(), mem_send_dump_next_cmd(), _MEM_Control::my_nid, and _MEM_Control::retry_qitem_p.
Referenced by mem_build_dump_data_1553(), and mem_build_dump_data_ssr().
unsigned int mem_handle_dump | ( | MEM_Control * | mem_p, | |
const ITC_QueueItem * | qitem_p, | |||
void * | pkt_p, | |||
unsigned int | len, | |||
unsigned int | min_len, | |||
unsigned int | fcode_orig, | |||
unsigned int | tran_id, | |||
ITC_NodeID | dest_nid | |||
) | [static] |
Common Memory Dump command handling.
mem_p | Pointer to MEM control block. | |
qitem_p | Pointer to received queue item. | |
pkt_p | Pointer to received command packet. | |
len | Length of received command packet, in bytes. | |
min_len | Minimum required length of command packet, in bytes. | |
fcode_orig | Original function code from command packet. | |
tran_id | Transaction ID from command packet. | |
dest_nid | Telemetry destination node ID. |
References _MEM_Control::dump_active, _MEM_Control::dump_dest_nid, _MEM_Control::dump_fcode, _MEM_Control::dump_first, _MEM_Control::dump_handle, _MEM_Control::dump_last, _MEM_Control::dump_tran_id, _MEM_Control::max_dump_pkts, mem_build_dump_data(), mem_check_state(), MEM_CreateDescriptorFromDumpCommand(), MEM_dumpStart(), mem_forward_cmd(), mem_send_dump_data(), MEM_updateStats(), mem_wut_handler(), _MEM_Control::my_tid, _MEM_Control::num_dump_pkts, _MEM_Control::poll_enabled, _MEM_Control::poll_usecs, _MEM_Control::retries, and _MEM_Control::wut_handle.
Referenced by MEM_LMEMDUMPMEM(), MEM_LMEMDUMPPCI(), MEM_LMEMDUMPREG(), and MEM_LMEMDUMPSYMREL().
unsigned int mem_handle_load | ( | MEM_Control * | mem_p | ) | [static] |
Common Memory Write command handling.
mem_p | Pointer to MEM control block. |
References _MEM_LoadInfo::is_active, _MEM_Control::load_handle, MEM_loadGetInfo(), and MEM_loadWrite().
Referenced by MEM_LMEMLOADMEM(), MEM_LMEMLOADPCI(), and MEM_LMEMLOADREG().
unsigned int MEM_LMEMDUMPCANCEL | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Memory Dump Cancel command.
Callback function for ITC that handles the Memory Dump Cancel telecommand.
prm | Unused. | |
qitem | Pointer to queue item. | |
pay | Pointer to command payload. | |
len | Length of the command payload, in bytes. |
References _MEM_Control::dump_active, _MEM_Control::dump_handle, MEM_CancelDump(), mem_check_state(), Mem_control_p, mem_forward_cmd(), and MEM_updateStats().
unsigned int MEM_LMEMDUMPMEM | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Memory Data Dump command.
Callback function for ITC that handles the Memory Data Dump telecommand.
prm | Unused. | |
qitem | Pointer to queue item. | |
pay | Pointer to command payload. | |
len | Length of the command payload, in bytes. |
References _MEM_CIDBF::bf, _MEM_LMEMDUMPMEM_Prm::dest, _MEM_LMEMDUMPMEM_Prm::idents, Mem_control_p, mem_handle_dump(), and _MEM_LMEMDUMPMEM_Pkt::pay.
unsigned int MEM_LMEMDUMPNEXT | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Dump-Next telecommand.
Callback function for ITC that handles the Dump-Next telecommand.
prm | Unused. | |
qitem | Pointer to queue item from ITC. | |
pay | Pointer to CCSDS packet containing the command. | |
len | Length of the CCSDS packet, in bytes. |
References _MEM_Control::dump_active, _MEM_Control::max_dump_pkts, mem_build_dump_data(), mem_check_state(), Mem_control_p, mem_forward_cmd(), mem_send_dump_data(), MEM_updateStats(), _MEM_Control::num_dump_pkts, _MEM_Control::poll_enabled, _MEM_Control::retries, and _MEM_Control::retry_qitem_p.
unsigned int MEM_LMEMDUMPPCI | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the PCI Device Header Dump telecommand.
Callback function for ITC that handles the PCI Device Header Dump telecommand.
prm | Unused. | |
qitem | Pointer to queue item from ITC. | |
pay | Pointer to CCSDS packet containing the command. | |
len | Length of the CCSDS packet, in bytes. |
References _MEM_CIDBF::bf, _MEM_LMEMDUMPPCI_Prm::idents, Mem_control_p, mem_handle_dump(), and _MEM_LMEMDUMPPCI_Pkt::pay.
unsigned int MEM_LMEMDUMPPOOL | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Memory Pool Status Dump telecommand.
Callback function for ITC that handles the Memory Pool Status Dump telecommand.
prm | Unused. | |
qitem | Pointer to queue item from ITC. | |
pay | Pointer to CCSDS packet containing the command. | |
len | Length of the CCSDS packet, in bytes. |
References _MEM_CIDBF::bf, _MEM_LMEMDUMPPOOL_Prm::idents, mem_check_state(), Mem_control_p, mem_forward_cmd(), mem_send_pool_data(), MEM_updateStats(), _MEM_LMEMDUMPPOOL_Pkt::pay, and _MEM_LMEMDUMPPOOL_Prm::poolID.
unsigned int MEM_LMEMDUMPREG | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Processor Register Dump telecommand.
Callback function for ITC that handles the Processor Register Dump telecommand.
prm | Unused. | |
qitem | Pointer to queue item from ITC. | |
pay | Pointer to CCSDS packet containing the command. | |
len | Length of the CCSDS packet, in bytes. |
References _MEM_CIDBF::bf, _MEM_LMEMDUMPREG_Prm::idents, Mem_control_p, mem_handle_dump(), and _MEM_LMEMDUMPREG_Pkt::pay.
unsigned int MEM_LMEMDUMPSYMREL | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Memory Dump Symbol Relative telecommand.
Callback function for ITC that handles the Memory Dump Symbol Relative telecommand.
prm | Unused. | |
qitem | Pointer to queue item from ITC. | |
pay | Pointer to CCSDS packet containing the command. | |
len | Length of the CCSDS packet, in bytes. |
References _MEM_LMEMDUMPMEM_Prm::addr, _MEM_CIDBF::bf, _MEM_LMEMDUMPSYMREL_Prm::dest, _MEM_LMEMDUMPSYMREL_Prm::idents, mem_check_state(), Mem_control_p, mem_forward_cmd(), mem_handle_dump(), MEM_LMEMDUMPMEM_FCODE, MEM_updateStats(), _MEM_LMEMDUMPSYMREL_Prm::name, _MEM_LMEMDUMPSYMREL_Prm::nameSize, _MEM_LMEMDUMPSYMREL_Prm::offset, _MEM_LMEMDUMPMEM_Pkt::pay, _MEM_LMEMDUMPSYMREL_Pkt::pay, _MEM_LMEMDUMPMEM_Prm::size, _MEM_LMEMDUMPSYMREL_Prm::size, _MEM_CADDR32::ui, and _MEM_CSIZE32::ui.
unsigned int MEM_LMEMDUMPSYMVAL | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Memory Symbol Lookup telecommand.
Callback function for ITC that handles the Memory Symbol Lookup telecommand.
prm | Unused. | |
qitem | Pointer to queue item from ITC. | |
pay | Pointer to CCSDS packet containing the command. | |
len | Length of the CCSDS packet, in bytes. |
References _MEM_CIDBF::bf, _MEM_TIDBF::bf, _MEM_LMEMSYMVAL_Tlm::hdr, _MEM_LMEMDUMPSYMVAL_Prm::idents, _MEM_LMEMSYMVAL_Tlm::idents, mem_check_state(), Mem_control_p, mem_forward_cmd(), mem_fpa_free(), mem_fpa_get(), MEM_LMEMSYMVAL_TLM_APID, MEM_updateStats(), _MEM_Control::my_nid, _MEM_LMEMSYMVAL_Tlm::name, _MEM_LMEMDUMPSYMVAL_Prm::name, _MEM_LMEMSYMVAL_Tlm::nameSize, _MEM_LMEMDUMPSYMVAL_Prm::nameSize, _MEM_LMEMSYMVAL_Tlm::pad16, _MEM_LMEMSYMVAL_Tlm::pad8, _MEM_LMEMDUMPSYMVAL_Pkt::pay, and _MEM_LMEMSYMVAL_Tlm::symValue.
unsigned int MEM_LMEMLOADMEM | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Memory Write command.
Callback function for ITC that handles the Memory Write telecommand.
prm | Unused. | |
qitem | Pointer to queue item. | |
pay | Pointer to command payload. | |
len | Length of the command payload, in bytes. |
References _MEM_Control::load_handle, mem_check_state(), Mem_control_p, mem_forward_cmd(), mem_handle_load(), MEM_loadPktMemory(), and MEM_updateStats().
unsigned int MEM_LMEMLOADPCI | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the PCI Device Header Write telecommand.
Callback function for ITC that handles the PCI Device Header Write telecommand.
prm | Unused. | |
qitem | Pointer to queue item from ITC. | |
pay | Pointer to CCSDS packet containing the command. | |
len | Length of the CCSDS packet, in bytes. |
References _MEM_Control::load_handle, mem_check_state(), Mem_control_p, mem_forward_cmd(), mem_handle_load(), MEM_loadPktPci(), and MEM_updateStats().
unsigned int MEM_LMEMLOADREG | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Processor Register Write telecommand.
Callback function for ITC that handles the Processor Register Write telecommand.
prm | Unused. | |
qitem | Pointer to queue item from ITC. | |
pay | Pointer to CCSDS packet containing the command. | |
len | Length of the CCSDS packet, in bytes. |
References _MEM_Control::load_handle, mem_check_state(), Mem_control_p, mem_forward_cmd(), mem_handle_load(), MEM_loadPktReg(), and MEM_updateStats().
unsigned int MEM_LMEMNOOP | ( | void * | prm, | |
const struct _ITC_QueueItem * | qitem, | |||
void * | pay, | |||
unsigned int | len | |||
) |
Handle the Memory No-Op command.
Callback function for ITC that handles the Memory No-Op telecommand.
prm | Unused. | |
qitem | Pointer to queue item. | |
pay | Pointer to command payload. | |
len | Length of the command payload, in bytes. |
References mem_check_state(), Mem_control_p, mem_forward_cmd(), and MEM_updateStats().
unsigned int mem_send_dump_data | ( | MEM_Control * | mem_p, | |
ITC_QueueItem * | qitem_p | |||
) | [static] |
Send a memory dump data telemetry packet.
mem_p | Pointer to MEM control block. | |
qitem_p | Pointer to packet queue item. |
References mem_fpa_free(), and _MEM_Control::num_dump_pkts.
Referenced by mem_handle_dump(), and MEM_LMEMDUMPNEXT().
unsigned int mem_send_dump_next_cmd | ( | MEM_Control * | mem_p | ) | [static] |
Send the LMEMDUMPNEXT command.
mem_p | Pointer to MEM control block. |
References _MEM_CIDBF::bf, _MEM_LMEMDUMPNEXT_Pkt::hdr, _MEM_LMEMDUMPNEXT_Prm::idents, MEM_APID_CMD_DUMP_LOAD, mem_fpa_free(), mem_fpa_get(), MEM_LMEMDUMPNEXT_FCODE, _MEM_Control::my_nid, _MEM_Control::my_tid, and _MEM_LMEMDUMPNEXT_Pkt::pay.
Referenced by mem_free_dump_pkt(), and mem_wut_handler().
unsigned int mem_send_pool_data | ( | MEM_Control * | mem_p, | |
unsigned int | pool_id, | |||
unsigned int | tran_id | |||
) | [static] |
Send memory pool statistics telemetry.
mem_p | Pointer to MEM control block. | |
pool_id | ID of the pool to query. | |
tran_id | Transaction ID to send in the telemetry. |
References _MEM_LMEMPOOLDATA_Tlm::allocBlocks, _MEM_LMEMPOOLDATA_Tlm::allocBytes, _MEM_TIDBF::bf, _MEM_LMEMPOOLDATA_Tlm::freeBlocks, _MEM_LMEMPOOLDATA_Tlm::freeBytes, _MEM_LMEMPOOLDATA_Tlm::hdr, _MEM_LMEMPOOLDATA_Tlm::idents, _MEM_LMEMPOOLDATA_Tlm::maxBlockBytes, mem_fpa_free(), mem_fpa_get(), MEM_LMEMPOOLDATA_TLM_APID, _MEM_Control::my_nid, _MEM_LMEMPOOLDATA_Tlm::pad, and _MEM_LMEMPOOLDATA_Tlm::poolID.
Referenced by MEM_LMEMDUMPPOOL().
WUT_cb_status mem_wut_handler | ( | void * | prm, | |
WUT_tmr * | wut | |||
) | [static] |
Callback routine for the Memory Dump wake-up timer.
prm | Pointer to MEM control block. | |
wut | Pointer to wake-up timer. |
References mem_send_dump_next_cmd(), _MEM_Control::poll_enabled, and _MEM_Control::poll_usecs.
Referenced by mem_handle_dump().