GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIM / dev > lim_unit_test / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

lim_util_tlm.c File Reference

Handle LIM telemetry. More...

#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ITC/ITC_pubdefs.h>
#include <LIM/LIM_msgs.h>
#include <LIM/LIM_tlmdefs.h>
#include <MSG/MSG_pubdefs.h>
#include <LIM/../src/LIM_pool.h>
#include <LIM/../src/LIM_task.h>
#include <lim_unit_test.h>
#include <lim_util_tlm.h>

Classes

struct  _TLM_Control
 Control information for the telemetry handler. More...
struct  _LIM_SC_Slew_Request_Pkt
 Request a spacecraft repoint APID 0x600 function code 2. More...

Defines

#define TLM_APID_LIM_STATE   (0x30f)
#define TLM_APID_SLEW_REQ_TLM   (0x344)
#define TLM_APID_SLEW_RSP_TLM   (0x345)
#define TLM_APID_SHED_ALERT_TLM   (0x346)
#define TLM_APID_SLEW_REQ_CMD   (0x600)
#define SHOW_TLM   1

Typedefs

typedef struct _TLM_Control TLM_Control
 Typedef for _TLM_Control.
typedef struct
_LIM_SC_Slew_Request_Pkt 
LIM_SC_Slew_Request_Pkt
 Typedef for packet _LIM_SC_Slew_Request_Pkt.

Functions

static unsigned int tlm_dispatch_cmd (void *prm, const ITC_QueueItem *qitem_p, void *pay_p, unsigned int len)
 Handle a packet sent to the spacecraft CMD queue.
static unsigned int tlm_dispatch_ctl (void *prm, const ITC_QueueItem *qitem_p, void *pay_p, unsigned int len)
 Handle a packet sent to the spacecraft CTL queue.
static unsigned int tlm_dispatch_ctl_x (void *prm, const ITC_QueueItem *qitem_p, void *pay_p, unsigned int len)
 Handle a packet sent to the spacecraft CTL_X queue.
int TLM_init (test_Test_Descriptor *td_p)
 Initialize the telemetry handler.
int TLM_start (test_Test_Descriptor *td_p)
 Start the telemetry handler task.
int TLM_stop (test_Test_Descriptor *td_p)
 Stop the telemetry handler task.
int TLM_shutdown (test_Test_Descriptor *td_p)
 Shutdown the telemetry handler task.
int TLM_tlm_rcvd (test_Test_Descriptor *td_p, int id)
 Check for received telemetry.
int TLM_check_tlm (test_Test_Descriptor *td_p, int id, TLM_Data *exp_tlm_p)
 Compare actual and expected packet data.
int TLM_check_no_tlm (test_Test_Descriptor *td_p)
 Verify that no packets were received.


Detailed Description

Handle LIM telemetry.

**  CVS $Id: lim_util_tlm.c,v 1.20 2011/03/30 22:23:43 apw Exp $
**  

Function Documentation

int TLM_check_no_tlm ( test_Test_Descriptor td_p  ) 

int TLM_check_tlm ( test_Test_Descriptor td_p,
int  id,
TLM_Data exp_tlm_p 
)

unsigned int tlm_dispatch_cmd ( void *  prm,
const ITC_QueueItem *  qitem_p,
void *  pay_p,
unsigned int  len 
) [static]

unsigned int tlm_dispatch_ctl ( void *  prm,
const ITC_QueueItem *  qitem_p,
void *  pay_p,
unsigned int  len 
) [static]

Handle a packet sent to the spacecraft CTL queue.

Parameters:
prm Context parameter (pointer to task control info).
qitem_p Pointer to queue item.
pay_p Pointer to queue item payload (packet).
len Length of queue item payload, in bytes.
Returns:
MSG code.

References _LIM_State_Tlm::action, _TLM_Data::apid, _LIM_Info::arr_active, _LIM_Info::arr_ready, _LIM_State_Tlm::arr_remain_sec, _LIM_Info::arr_remain_sec, _LIM_State_Tlm::arr_state, _LIM_TGBMCONFIGBF::bf, _LIM_THVCONFIGBF::bf, _LIM_TARRSTATEBF::bf, _LIM_TTOOSTATEBF::bf, DIM, _TLM_Data::fc, _LIM_State_Tlm::gbm_config, _LIM_State_Tlm::gbm_int_dis_remain_sec, _LIM_Info::gbm_int_dis_remain_sec, _LIM_Info::gbm_pri_int_allowed, _LIM_Info::gbm_red_int_allowed, _LIM_Info::gbm_rep_allowed, _LIM_Info::grb_state, _LIM_Info::hv_allowed, _LIM_State_Tlm::hv_config, _TLM_Data::info, _LIM_Info::last_action, _LIM_Info::last_status, _LIM_State_Tlm::lci_state, _LIM_Info::lci_state, _LIM_State_Tlm::ldf_state, _LIM_Info::ldf_state, LIM_task_get_extra_ptr(), _LIM_State_Tlm::lpa_state, _LIM_Info::lpa_state, _LIM_State_Tlm::op_mode, _LIM_Info::op_mode, _TLM_Data::pay_len, _TLM_Data::pkt_len, _TLM_Data::queue, _LIM_Info::rep_req_pending, _LIM_State_Tlm::saa_transit, _LIM_Info::saa_transit, _LIM_State_Tlm::status, test_Show_Info(), _LIM_Info::too_active, _LIM_Info::too_ready, _LIM_State_Tlm::too_remain_sec, _LIM_Info::too_remain_sec, _LIM_Info::too_started, _LIM_State_Tlm::too_state, _LIM_State_Tlm::virt_mode, and _LIM_Info::virt_mode.

Referenced by TLM_init().

unsigned int tlm_dispatch_ctl_x ( void *  prm,
const ITC_QueueItem *  qitem_p,
void *  pay_p,
unsigned int  len 
) [static]

int TLM_init ( test_Test_Descriptor td_p  ) 

int TLM_shutdown ( test_Test_Descriptor td_p  ) 

int TLM_start ( test_Test_Descriptor td_p  ) 

int TLM_stop ( test_Test_Descriptor td_p  ) 

int TLM_tlm_rcvd ( test_Test_Descriptor td_p,
int  id 
)

Check for received telemetry.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
Returns:
Nonzero value if any telemetry packets have been received.

References LIM_task_get_extra_ptr(), test_Pop_State(), test_Push_State(), test_Status_Success(), and _test_Test_Descriptor::tlm_task_p.

Referenced by WRAP_check_telem().


Generated on Wed Mar 30 15:28:24 2011 by  doxygen 1.5.8