GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MEM / V5-8-2 > mem_unit_test / linux-gcc
#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ITC/ITC_pubdefs.h>
#include <MEM/MEM_msgs.h>
#include <MEM/MEM_tlmdefs.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/MBA.h>
#include <mem_unit_test.h>
#include <mem_util_task.h>
#include <mem_util_tlm.h>
Classes | |
struct | _TLM_Control |
Control information for the telemetry handler. More... | |
Defines | |
#define | TLM_APID_MEM_DATA_SIU (788) |
Typedefs | |
typedef struct _TLM_Control | TLM_Control |
Typedef for _TLM_Control. | |
Functions | |
static unsigned int | tlm_dispatch (void *prm, const ITC_QueueItem *qitem_p, void *pay_p, unsigned int len) |
Handle a packet sent to the spacecraft. | |
int | TLM_init (test_Test_Descriptor *td_p) |
Initialize the telemetry handler task. | |
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. |
** CVS $Id: mem_util_tlm.c,v 1.3 2011/03/29 01:58:52 apw Exp $ **
int TLM_check_no_tlm | ( | test_Test_Descriptor * | td_p | ) |
Verify that no packets were received.
td_p | Pointer to test descriptor. |
0 | Success. | |
-1 | Failure. |
References _TLM_Data::apid, _TLM_Data::data, DIM, test_Generic_Error(), test_NULL_Compare(), test_Show_Tlm(), and _test_Test_Descriptor::tlm_ctl_p.
Referenced by WRAP_check_telem().
int TLM_check_tlm | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
TLM_Data * | exp_tlm_p | |||
) |
Compare actual and expected packet data.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
exp_tlm_p | Pointer to expected packet data. |
0 | Success. | |
-1 | Failure. |
References _TLM_Data::apid, _TLM_Data::data, DIM, _MEM_LMEMSIUDATA_Tlm::hdr, _TLM_Data::pay_len, _TLM_Data::pkt_len, test_DumpTlm_Compare(), test_Generic_Error(), test_NULL_Compare(), test_Pop_State(), test_Push_State(), test_Value32_Compare(), _test_Test_Descriptor::tlm_ctl_p, and TLM_tlm_rcvd().
Referenced by WRAP_check_telem().
unsigned int tlm_dispatch | ( | void * | prm, | |
const ITC_QueueItem * | qitem_p, | |||
void * | pay_p, | |||
unsigned int | len | |||
) | [static] |
Handle a packet sent to the spacecraft.
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. |
References _TLM_Data::apid, _TLM_Data::data, _TLM_Control::data, DIM, _TLM_Control::head, _TLM_Data::pay_len, _TLM_Data::pkt_len, _TLM_Control::tail, test_Show_Item(), and _test_Test_Descriptor::tlm_ctl_p.
Referenced by TLM_init().
int TLM_init | ( | test_Test_Descriptor * | td_p | ) |
Initialize the telemetry handler task.
td_p | Pointer to test descriptor. |
0 | Success. | |
-1 | Failure. |
References TASK_add_queue(), TASK_init(), test_NULL_Compare(), test_Pop_State(), test_Push_State(), test_Status_Success(), _test_Test_Descriptor::tlm_ctl_p, and tlm_dispatch().
Referenced by mem_unit_test_func().
int TLM_shutdown | ( | test_Test_Descriptor * | td_p | ) |
Shutdown the telemetry handler task.
td_p | Pointer to test descriptor. |
0 | Success. | |
-1 | Failure. |
References TASK_remove_queue(), TASK_shutdown(), test_NULL_Compare(), test_Pop_State(), test_Push_State(), test_Status_Success(), and _test_Test_Descriptor::tlm_ctl_p.
Referenced by mem_unit_test_func().
int TLM_start | ( | test_Test_Descriptor * | td_p | ) |
Start the telemetry handler task.
td_p | Pointer to test descriptor. |
0 | Success. | |
-1 | Failure. |
References TASK_start(), test_NULL_Compare(), test_Pop_State(), test_Push_State(), and _test_Test_Descriptor::tlm_ctl_p.
Referenced by mem_unit_test_func().
int TLM_stop | ( | test_Test_Descriptor * | td_p | ) |
Stop the telemetry handler task.
td_p | Pointer to test descriptor. |
0 | Success. | |
-1 | Failure. |
References TASK_stop(), test_NULL_Compare(), test_Pop_State(), test_Push_State(), and _test_Test_Descriptor::tlm_ctl_p.
Referenced by mem_unit_test_func().
int TLM_tlm_rcvd | ( | test_Test_Descriptor * | td_p, | |
int | id | |||
) |
Check for received telemetry.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. |
References test_NULL_Compare(), test_Pop_State(), test_Push_State(), and _test_Test_Descriptor::tlm_ctl_p.
Referenced by TLM_check_tlm(), and WRAP_check_telem().