GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCM / dev > lcm_siu / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

LCM_message.c File Reference

CPU generic functions for message (MSG) telemetering. More...

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


Detailed Description

CPU generic functions for message (MSG) telemetering.

CVS $Id: LCM_message.c,v 1.3 2011/03/29 21:59:34 apw Exp $
Author:
A.P.Waite
LCM_message.c provides CPU generic support for LCM's telemetering of MSG messages.

Function Documentation

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.

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

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

Parameters:
ctl (in) LCM control block
LCM_messageInitialize() builds up the CPU common facilities for sending messages to CTDB/SSR.

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.

Parameters:
sem The semaphore to release to indicate delay done.
timer The WUT handle for the timer.
Returns:
WUT_K_STATE_CHANGE_NO.

Referenced by LCM_freeMsg().

static void LCM_msgOutputCTDB ( MSG_OutputModes  mode,
void *  prm,
MSG_Message *  msg 
) [static]

static void LCM_msgOutputSSR ( MSG_OutputModes  mode,
void *  prm,
MSG_Message *  msg 
) [static]


Variable Documentation

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
}
Array mapping MSG severity codes into increasing levels.


Generated on Wed Mar 30 16:05:43 2011 by  doxygen 1.5.8