GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QMEM / V0-2-1 > qmem_unit_test / rhel6-64
#include <stdlib.h>
#include <string.h>
#include <QMEM/QMEM.h>
#include <qmem_unit_test.h>
#include <qmem_util_wrap.h>
Functions | |
void | WRAP_init_info (WRAP_Info *info_p) |
Init a wrap info structure. | |
void | WRAP_free_context (QMEM_Context *context_p) |
Free a QMEM parsing context. | |
int | WRAP_alloc_context (test_Test_Descriptor *td_p, int id, QMEM_Context **ctx_pp) |
Allocate a QMEM parsing context. | |
int | WRAP_get_context (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p) |
Call QMEM context functions and validate the results. | |
int | WRAP_init_context (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p) |
Call QMEM_init_context() and validate the results. | |
int | WRAP_parse_contribution (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p) |
Call QMEM_parse_contribution() and validate the results. | |
int | WRAP_parse_datagram (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p) |
Call QMEM_parse_datagram() and validate the results. | |
int | WRAP_start_parsing (test_Test_Descriptor *td_p, int id, WRAP_Info *info_p) |
Call QMEM_start_parsing() and validate the results. |
** CVS $Id: qmem_util_wrap.c,v 1.2 2011/03/30 23:56:36 russell Exp $ **
int WRAP_alloc_context | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
QMEM_Context ** | ctx_pp | |||
) |
Allocate a QMEM parsing context.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
ctx_pp | Location to return pointer to allocated context. |
0 | Success. | |
-1 | Failure. |
References QMEM_sizeof_context(), test_Generic_Error(), test_NULL_Compare(), test_Pop_State(), and test_Push_State().
Referenced by qmem_test_context(), qmem_test_ctb(), qmem_test_datagram(), and qmem_test_start().
void WRAP_free_context | ( | QMEM_Context * | context_p | ) |
Free a QMEM parsing context.
context_p | Pointer to context to free. |
Referenced by qmem_test_context(), qmem_test_ctb(), qmem_test_datagram(), and qmem_test_start().
int WRAP_get_context | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
WRAP_Info * | info_p | |||
) |
Call QMEM context functions and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to wrap control info. |
0 | Success. | |
-1 | Failure. |
References _WRAP_Info::act_ctx, _WRAP_Info::act_data_p, _Context::bytes_available, _Context::bytes_dumped, _Context::cmd_fcode, _WRAP_Info::context_p, _Context::data_buf, _WRAP_Info::exp_ctx, _WRAP_Info::exp_data_bytes, _WRAP_Info::exp_data_p, _Context::lat_unit, _Context::num_datagrams, QMEM_bytes_available(), QMEM_bytes_dumped(), QMEM_cmd_fcode(), QMEM_data_buf(), QMEM_lat_unit(), QMEM_num_datagrams(), QMEM_start_addr(), QMEM_status(), QMEM_tran_id(), _Context::start_addr, _Context::status, test_Context_Compare(), test_Memory_Compare(), test_Pop_State(), test_Push_State(), and _Context::tran_id.
Referenced by qmem_test_context(), WRAP_init_context(), WRAP_parse_contribution(), WRAP_parse_datagram(), and WRAP_start_parsing().
int WRAP_init_context | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
WRAP_Info * | info_p | |||
) |
Call QMEM_init_context() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to wrap control info. |
0 | Success. | |
-1 | Failure. |
References _WRAP_Info::context_p, _WRAP_Info::data_buf_bytes, _WRAP_Info::data_buf_p, _WRAP_Info::exp_status, QMEM_init_context(), test_Pop_State(), test_Push_State(), test_Status_Compare(), and WRAP_get_context().
Referenced by qmem_test_context(), qmem_test_ctb(), qmem_test_datagram(), and qmem_test_start().
int WRAP_init_info | ( | WRAP_Info * | info_p | ) |
Init a wrap info structure.
info_p | Pointer to wrap info. |
References _WRAP_Info::act_data_p, _WRAP_Info::context_p, _WRAP_Info::data_buf_p, _WRAP_Info::dgm_p, and _WRAP_Info::exp_data_p.
Referenced by qmem_test_context(), qmem_test_ctb(), qmem_test_datagram(), and qmem_test_start().
int WRAP_parse_contribution | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
WRAP_Info * | info_p | |||
) |
Call QMEM_parse_contribution() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to wrap control info. |
0 | Success. | |
-1 | Failure. |
References _WRAP_Info::context_p, _WRAP_Info::ctb_p, _WRAP_Info::dgm_bytes, _WRAP_Info::dgm_swapped, _WRAP_Info::exp_status, QMEM_parse_contribution(), test_Pop_State(), test_Push_State(), test_Status_Compare(), and WRAP_get_context().
Referenced by qmem_test_ctb().
int WRAP_parse_datagram | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
WRAP_Info * | info_p | |||
) |
Call QMEM_parse_datagram() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to wrap control info. |
0 | Success. | |
-1 | Failure. |
References _WRAP_Info::context_p, _WRAP_Info::dgm_bytes, _WRAP_Info::dgm_p, _WRAP_Info::dgm_swapped, _WRAP_Info::exp_status, QMEM_parse_datagram(), test_Pop_State(), test_Push_State(), test_Status_Compare(), and WRAP_get_context().
Referenced by qmem_test_datagram().
int WRAP_start_parsing | ( | test_Test_Descriptor * | td_p, | |
int | id, | |||
WRAP_Info * | info_p | |||
) |
Call QMEM_start_parsing() and validate the results.
td_p | Pointer to test descriptor. | |
id | ID to use for user messages. | |
info_p | Pointer to wrap control info. |
0 | Success. | |
-1 | Failure. |
References _WRAP_Info::context_p, _WRAP_Info::dgm_bytes, _WRAP_Info::dgm_p, _WRAP_Info::dgm_swapped, _WRAP_Info::exp_status, QMEM_start_parsing(), test_Pop_State(), test_Push_State(), test_Status_Compare(), and WRAP_get_context().
Referenced by qmem_test_ctb(), and qmem_test_start().