GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MEM / V5-8-2 > mem_unit_test / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

mem_util_wrap.c File Reference

Wrappers for MEM functions. More...

#include <string.h>
#include <ITC/ITC_pubdefs.h>
#include <MEM/MEM_msgs.h>
#include <MEM/MEM_pubdefs.h>
#include <MSG/MSG_pubdefs.h>
#include <mem_unit_test.h>
#include <mem_util_tlm.h>
#include <mem_util_wrap.h>

Functions

void WRAP_init_info (WRAP_Info *info_p)
 Init a wrap info structure.
int WRAP_check_telem (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p, unsigned int max_msecs)
 Verify expected telemetry.
int WRAP_get_info (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p)
 Call MEM_getInfo() and validate the results.
int WRAP_initialize (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p)
 Call MEM_initialize() and validate the results.
int WRAP_init (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p)
 Call MEM_init() and validate the results.
int WRAP_read_surom (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p)
 Call MEM_readSurom() and validate the results.
int WRAP_shutdown (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p)
 Call MEM_shutdown() and validate the results.
static TLM_Datawrap_exp_pkt (WRAP_Info *info_p, unsigned int exp_apid)
 Set expected incoming packet values.
void WRAP_exp_dump_data (WRAP_Info *info_p, unsigned int start_word, unsigned int num_words, unsigned int data_start, unsigned int data_delta)
 Expect memory dump data.
void WRAP_exp_dump_tlm (WRAP_Info *info_p, unsigned int exp_lat_unit, unsigned int exp_tran_id, unsigned int exp_address, unsigned int exp_num_words, unsigned int exp_cmd_fcode)
 Expect memory dump telemetry.


Detailed Description

Wrappers for MEM functions.

**  CVS $Id: mem_util_wrap.c,v 1.4 2011/03/29 01:58:52 apw Exp $
**  

Function Documentation

int WRAP_check_telem ( test_Test_Descriptor td_p,
int  id,
WRAP_Info info_p,
unsigned int  max_msecs 
)

Verify expected telemetry.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to wrap control info.
max_msecs Max time to wait for telemetry, in milliseconds.
Return values:
0 Success.
-1 Failure.

References _WRAP_Info::exp_telem, test_Delay(), test_Pop_State(), test_Push_State(), TLM_check_no_tlm(), TLM_check_tlm(), and TLM_tlm_rcvd().

Referenced by cmd_send().

void WRAP_exp_dump_data ( WRAP_Info info_p,
unsigned int  start_word,
unsigned int  num_words,
unsigned int  data_start,
unsigned int  data_delta 
)

Expect memory dump data.

Parameters:
info_p Pointer to wrap control info.
start_word First word to expect.
num_words Number of words to expect.
data_start Starting expected data value.
data_delta Expected data stride.
Returns:
Nothing.

References _MEM_LMEMSIUDATA_Tlm::data, _TLM_Data::data, _WRAP_Info::exp_telem, and _WRAP_Info::num_exp_telem.

Referenced by mem_RamAccess_test().

void WRAP_exp_dump_tlm ( WRAP_Info info_p,
unsigned int  exp_lat_unit,
unsigned int  exp_tran_id,
unsigned int  exp_address,
unsigned int  exp_num_words,
unsigned int  exp_cmd_fcode 
)

Expect memory dump telemetry.

Parameters:
info_p Pointer to wrap control info.
exp_lat_unit Expected LAT unit value.
exp_tran_id Expected transaction ID value.
exp_address Expected address value.
exp_num_words Expected word count value.
exp_cmd_fcode Expected command fcode value.
Returns:
Nothing.

References _MEM_LMEMSIUDATA_Tlm::address, _MEM_TIDBF::bf, _MEM_LMEMSIUDATA_Tlm::cmdFuncCode, _MEM_LMEMSIUDATA_Tlm::data, _TLM_Data::data, _MEM_LMEMSIUDATA_Tlm::idents, _MEM_LMEMSIUDATA_Tlm::wordCount, and wrap_exp_pkt().

Referenced by mem_RamAccess_test().

TLM_Data * wrap_exp_pkt ( WRAP_Info info_p,
unsigned int  exp_apid 
) [static]

Set expected incoming packet values.

Parameters:
info_p Pointer to wrap control info.
exp_apid Expected APID value.
Returns:
Pointer to expected telemetry information.

References _TLM_Data::apid, _WRAP_Info::exp_telem, and _WRAP_Info::num_exp_telem.

Referenced by WRAP_exp_dump_tlm().

int WRAP_get_info ( test_Test_Descriptor td_p,
int  id,
WRAP_Info info_p 
)

Call MEM_getInfo() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to wrap control info.
Return values:
0 Success.
-1 Failure.

References _WRAP_Info::act_info_p, _WRAP_Info::exp_info, _WRAP_Info::exp_info_status, test_Info_Compare(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().

Referenced by cmd_send(), mem_Control_test(), WRAP_init(), WRAP_initialize(), and WRAP_shutdown().

int WRAP_init ( test_Test_Descriptor td_p,
int  id,
WRAP_Info info_p 
)

Call MEM_init() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to wrap control info.
Return values:
0 Success.
-1 Failure.

References _WRAP_Info::exp_status, test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), test_Status_Compare(), and WRAP_get_info().

Referenced by mem_Control_test(), and mem_RamAccess_test().

void WRAP_init_info ( WRAP_Info info_p  ) 

Init a wrap info structure.

Parameters:
info_p Pointer to wrap info.
Returns:
Nothing.

References _WRAP_Info::act_info_p, _WRAP_Info::exp_info, _WRAP_Info::exp_info_status, _WRAP_Info::exp_status, and _WRAP_Info::num_exp_telem.

Referenced by mem_Control_test(), and mem_RamAccess_test().

int WRAP_initialize ( test_Test_Descriptor td_p,
int  id,
WRAP_Info info_p 
)

Call MEM_initialize() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to wrap control info.
Return values:
0 Success.
-1 Failure.

References _WRAP_Info::exp_status, _WRAP_Info::task_p, test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), test_Status_Compare(), _WRAP_Info::tid, and WRAP_get_info().

Referenced by mem_Control_test().

int WRAP_read_surom ( test_Test_Descriptor td_p,
int  id,
WRAP_Info info_p 
)

Call MEM_readSurom() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to wrap control info.
Return values:
0 Success.
-1 Failure.

References _WRAP_Info::act_surom, _WRAP_Info::exp_surom, _WRAP_Info::surom_check_data, _WRAP_Info::surom_dst_p, _WRAP_Info::surom_num_bytes, _WRAP_Info::surom_src_p, test_Memory_Compare(), test_Pop_State(), test_Push_State(), and test_Value32_Compare().

Referenced by mem_Control_test().

int WRAP_shutdown ( test_Test_Descriptor td_p,
int  id,
WRAP_Info info_p 
)

Call MEM_shutdown() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to wrap control info.
Return values:
0 Success.
-1 Failure.

References _WRAP_Info::exp_status, test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), test_Status_Compare(), and WRAP_get_info().

Referenced by mem_Control_test(), and mem_RamAccess_test().


Generated on Wed Nov 21 21:09:16 2012 by  doxygen 1.5.8