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_test_desc.c File Reference

Test the memory descriptor creation functions. More...

#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <MEM/MEM.h>
#include <MEM/MEM_msgs.h>
#include <mem_unit_test.h>

Functions

static int mem_check_null_desc_params (test_Test_Descriptor *td_p)
 Verify that descriptor creators detect NULL parameter pointers.
static int mem_check_dump_command (test_Test_Descriptor *td_p)
 Test the MEM_CreateDescriptorFromDumpCommand function.
void mem_CreateDescriptor_test (test_Test_Descriptor *td_p, const unsigned int bit_mask)
 Unit test for memory descriptor creation.


Detailed Description

Test the memory descriptor creation functions.

  CVS $Id: mem_test_desc.c,v 1.8 2011/03/29 01:58:52 apw Exp $
  

Test the operation of the functions that create memory descriptors.


Function Documentation

void mem_check_dump_command ( test_Test_Descriptor td_p  )  [static]

Test the MEM_CreateDescriptorFromDumpCommand function.

Call the MEM_CreateDescriptorFromDumpCommand function with various command packets.

Parameters:
td_p Pointer to test descriptor.
Return values:
0 Success.
-1 Failure.

References _MEM_Descriptor::addr, _MEM_Descriptor::bytes, MEM_APID_LAT_MEM_DUMP, MEM_CreateDescriptorFromDumpCommand(), MEM_FC_MEM_DUMP_MEMORY, MEM_FC_MEM_DUMP_PCI, MEM_FC_MEM_DUMP_REGISTER, _MEM_Descriptor::memmap, test_Descriptor_Compare(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), test_Status_Compare(), and _MEM_Descriptor::words.

Referenced by mem_CreateDescriptor_test().

void mem_check_null_desc_params ( test_Test_Descriptor td_p  )  [static]

Verify that descriptor creators detect NULL parameter pointers.

Call the various memory descriptor creation functions and verify that they detect NULL parameter pointers.

Parameters:
td_p Pointer to test descriptor.
Return values:
0 Success.
-1 Failure.

References MEM_CreateDescriptorFromDumpCommand(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().

Referenced by mem_CreateDescriptor_test().

void mem_CreateDescriptor_test ( test_Test_Descriptor td_p,
const unsigned int  bit_mask 
)

Unit test for memory descriptor creation.

Run unit test for memory descriptor creation. Test the creation of memory descriptors from memory dump and load commands.

Parameters:
td_p Pointer to test descriptor.
bit_mask Bitmask ID for this subtest.
Returns:
Nothing.

References _test_Test_Descriptor::exec, _test_Test_Descriptor::fail, mem_check_dump_command(), mem_check_null_desc_params(), test_Pop_State(), and test_Push_State().

Referenced by mem_unit_test_func().


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