GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCM / dev > lcm_siu / rhel4-32
#include <string.h>
#include <PBI/Endianness.h>
#include <CCSDS/CCSDS_pkt.h>
#include <LSF/LSF_ids.h>
#include <MDB/MDB_pubdefs.h>
#include <PBS/MBA.h>
#include <PBS/SEM.h>
#include <PBS/WUT.h>
#include <LCM/LCM_msgs.h>
#include <LCM/LCM_tlmdefs.h>
#include <LCM/LCM_pubdefs.h>
#include <LCM_prvdefs.h>
Functions | |
static void | LCM_msgOutputCTDB (MSG_OutputModes mode, void *prm, MSG_Message *msg) |
static void | LCM_msgOutputSSR (MSG_OutputModes mode, void *prm, MSG_Message *msg) |
static WUT_cb_status | LCM_msgDelay (SEM sem, WUT_tmr *timer) |
static void | LCM_freeMsg (ITC_QueueItem *qitem, unsigned int status, LCM_Control *ctl, void *prm1, void *prm2) |
static void | LCM_freeMsgSSR (ITC_QueueItem *qitem, unsigned int status, LCM_Control *ctl, void *prm1, void *prm2) |
unsigned int | LCM_messageInitialize (LCM_Control *ctl) |
Initialize the LCM message handling subsystem. | |
void | LCM_msgAttachCTDB (void) |
Setup MSG output callback for CTDB diagnostic telemetry. | |
void | LCM_msgAttachSSR (void) |
Setup MSG output callback for SSR science data telemetry. | |
Variables | |
static const unsigned short | apidMap [] |
static const int | LCM_severityXlat [4] |
CVS $Id: LCM_message.c,v 1.3 2011/03/29 21:59:34 apw Exp $
static void LCM_freeMsg | ( | ITC_QueueItem * | qitem, | |
unsigned int | status, | |||
LCM_Control * | ctl, | |||
void * | prm1, | |||
void * | prm2 | |||
) | [static] |
Free memory after sending MSG CTDB telemetry packets.
qitem | The memory buffer. | |
status | Status of telemetry. | |
ctl | LCM control structure. | |
prm1 | Completion callback paramter 1. | |
prm2 | Completion callback paramter 2. |
References _LCM_Control::config, LCM_msgDelay(), _LCM_Control::msg_pool, _LCM_Control::msg_sem, _LCM_Control::msg_timer, and _LCM_Control::node_id.
Referenced by LCM_msgOutputCTDB().
static void LCM_freeMsgSSR | ( | ITC_QueueItem * | qitem, | |
unsigned int | status, | |||
LCM_Control * | ctl, | |||
void * | prm1, | |||
void * | prm2 | |||
) | [static] |
Free memory after sending MSG SSR telemetry packets.
qitem | The memory buffer. | |
status | Status of telemetry. | |
ctl | LCM control structure. | |
prm1 | Completion callback parameter 1. | |
prm2 | Completion callback parameter 2. |
References _LCM_Control::msg_sem.
Referenced by LCM_msgOutputSSR().
unsigned int LCM_messageInitialize | ( | LCM_Control * | ctl | ) |
Initialize the LCM message handling subsystem.
ctl | (in) LCM control block |
References _LCM_Control::config, _LCM_Control::itc_hdr_size, LCM_LCMMSGLEVEL_MSGLVLDISABLE, LCM_LCMMSGLEVEL_MSGLVLINFO, LCM_MSG_SSR_TEXT_SIZE, _LCM_Control::msg_buf, _LCM_Control::msg_level_ctdb, _LCM_Control::msg_level_ssr, _LCM_Control::msg_sem, and _LCM_Control::telem_hdr_size.
Referenced by LCM_initialize().
void LCM_msgAttachCTDB | ( | void | ) |
Setup MSG output callback for CTDB diagnostic telemetry.
Attach LCM CTDB output callback.
References LCM_msgOutputCTDB().
void LCM_msgAttachSSR | ( | void | ) |
Setup MSG output callback for SSR science data telemetry.
Attach LCM SSR science data output callback.
References LCM_msgOutputSSR().
static WUT_cb_status LCM_msgDelay | ( | SEM | sem, | |
WUT_tmr * | timer | |||
) | [static] |
Timer callback for MSG send delay.
sem | The semaphore to release to indicate delay done. | |
timer | The WUT handle for the timer. |
Referenced by LCM_freeMsg().
static void LCM_msgOutputCTDB | ( | MSG_OutputModes | mode, | |
void * | prm, | |||
MSG_Message * | msg | |||
) | [static] |
Output callback which packages each MSG record as a single CTDB diagnostic CCSDS telemetry packet.
mode | Current MSG control mode. | |
prm | User parameter. | |
msg | MSG output record to send. |
References _LCM_MsgStruct::code, _LCM_MsgStruct::facility, _LCM_MsgStruct::function, _LCM_Control::itc_hdr_size, LCM_CTL_INITIALIZED, LCM_CTL_RUNNING, LCM_freeMsg(), LCM_lcb, LCM_LCMMSGOUTC_TLM_APID, _LCM_MsgStruct::mnemonic, _LCM_Control::msg_buf, _LCM_Control::msg_level_ctdb, _LCM_Control::msg_pool, _LCM_Control::msg_sem, _LCM_LCMMSGOUTC_Tlm::msgPad, _LCM_LCMMSGOUTC_Tlm::msgStruct, _LCM_Control::mtx, _LCM_Control::node_id, _LCM_MsgStruct::serial, _LCM_Control::state, _LCM_MsgStruct::task, _LCM_Control::telem_hdr_size, _LCM_MsgStruct::text, _LCM_MsgStruct::time, and _LCM_CpuSerial::ui.
Referenced by LCM_msgAttachCTDB().
static void LCM_msgOutputSSR | ( | MSG_OutputModes | mode, | |
void * | prm, | |||
MSG_Message * | msg | |||
) | [static] |
Output callback which packages each MSG record as a single LCM datagram wrapped by a CCSDS science data telemetry packet.
mode | Current MSG control mode. | |
prm | User parameter. | |
msg | MSG output record to send. |
References _LCM_MSG_Dump_Datagram::dgm_hdr, _LCM_MSG_Dump_Datagram::info, _LCM_MSG_Dump_Datagram::info_hdr, _LCM_Control::itc_hdr_size, LCM_CTL_INITIALIZED, LCM_CTL_RUNNING, LCM_freeMsgSSR(), LCM_lcb, LCM_MSG_ID_INFO, LCM_MSG_ID_TEXT, LCM_MSG_SSR_TEXT_SIZE, LCM_MSG_VERSION_DGM, LCM_MSG_VERSION_INFO, LCM_MSG_VERSION_TEXT, _LCM_Control::msg_buf, _LCM_Control::msg_level_ssr, _LCM_Control::msg_sem, _LCM_MSG_Dump_Info::msgCode, _LCM_MSG_Dump_Info::msgFacil, _LCM_MSG_Dump_Info::msgFunc, _LCM_MSG_Dump_Info::msgName, _LCM_MSG_Dump_Info::msgReserve, _LCM_MSG_Dump_Info::msgSerial, _LCM_MSG_Dump_Info::msgTask, _LCM_MSG_Dump_Info::msgTime, _LCM_MSG_Dump_Info::msgVersion, _LCM_Control::mtx, _LCM_Control::node_id, _LCM_Control::state, _LCM_Control::telem_hdr_size, _LCM_MSG_Dump_Datagram::text_hdr, _LCM_MSG_Dump_Info::textSize, and _LCM_CpuSerial::ui.
Referenced by LCM_msgAttachSSR().
apidMap [static] |
Initial value:
Array mapping ITC node ID's to SSR telemetry packet APID's.LCM_severityXlat [static] |
Initial value:
{ 0, 2, 1, 3 }