GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LIM / V1-19-2
Constituent: lim_unit_test     Tag: rad750
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stddef.h>
#include "CDM/CDM_pubdefs.h"
#include "ITC/ITC_msgs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCS/LCS_pubdefs.h"
#include "LIM/LIM_msgs.h"
#include "LIM/LIM_pubdefs.h"
#include "LPA/LPA_msgs.h"
#include "MSG/MSG_pubdefs.h"
#include "MSG/MSG_printProc.h"
#include "PBS/PBS.h"
#include "PBS/SEM.h"
#include "PBS/TASK.h"
#include "lim_unit_test.h"
Include dependency graph for lim_unit_test.c:
Functions | |
static void | show_banner (const char *desc_1, const char *desc_2) |
Display a message as a banner. | |
static void | show_at_level (const int level, const char *item_1, const char *item_2) |
Display text with indentation. | |
void | test_Push_State (test_Test_Descriptor *td_p, const char *desc, const int index) |
Enter a new test state. | |
void | test_Pop_State (test_Test_Descriptor *td_p) |
Return for a test state. | |
static void | show_desc_stack (const test_Test_Descriptor *td_p) |
Display the current state description stack. | |
const char * | test_Action_Name (const LIM_Action_Id action) |
Return a text description of a LIM action. | |
const char * | test_Grb_State_Name (const LIM_Grb_State grb_state) |
Return a text description of a GRB state. | |
const char * | test_Op_Mode_Name (const LIM_Operating_Mode op_mode) |
Return a text description of an operating mode. | |
const char * | test_Other_State_Name (const LIM_Other_State other_state) |
Return a text description of an 'other' task state. | |
const char * | test_Status_Name (const unsigned int status) |
Return a text description of a status code. | |
static void | show_status_name (const unsigned int status) |
Display the name for a status code. | |
static unsigned int | lim_start_message_system (void) |
Start the messaging system. | |
static unsigned int | lim_stop_message_system (void) |
Stop the messaging system. | |
void | test_Show (const test_Test_Descriptor *td_p, const int level, const char *item_1, const char *item_2) |
Display text with indentation. | |
void | test_Show_Msg_OK (const test_Test_Descriptor *td_p) |
Indicate that the next error message is expected. | |
void | test_Sleep_Sec (int num_secs) |
Sleep for the specified number of seconds. | |
static WUT_cb_status | test_wut_handler (void *prm, WUT_tmr *wut) |
Handle wake-up timer expiration. | |
int | test_Delay (const test_Test_Descriptor *td_p, const unsigned int num_usecs) |
Delay the current task a number of microseconds. | |
int | test_Generic_Error (const test_Test_Descriptor *td_p, const char *fmt, const char *str_param, const unsigned int int_param) |
Display a generic error message. | |
int | test_Count_Compare (const test_Test_Descriptor *td_p, const test_Cmd_Counts *exp_p, const test_Cmd_Counts *act_p, const char *desc) |
Verify command count values. | |
int | test_Parm_Compare (const test_Test_Descriptor *td_p, const test_Start_Parms *exp_p, const test_Start_Parms *act_p, const char *desc) |
Verify simulated task start parameter values. | |
void | test_Show_Info (const test_Test_Descriptor *td_p, const LIM_Info *exp_p, const LIM_Info *act_p) |
Display LIM info. | |
int | test_Info_Compare (const test_Test_Descriptor *td_p, const LIM_Info *exp_p, const LIM_Info *act_p, const char *desc) |
Verify the contents of LIM information. | |
void | test_Show_Slew (const test_Test_Descriptor *td_p, const test_Slew_Info *exp_p, const test_Slew_Info *act_p, const char *desc) |
Display Slew-Request command parameters. | |
int | test_Slew_Compare (const test_Test_Descriptor *td_p, const test_Slew_Info *exp_p, const test_Slew_Info *act_p, const char *desc) |
Verify Slew-Request command parameters. | |
int | test_Memory_Compare (const test_Test_Descriptor *td_p, const void *expect_p, const void *actual_p, const void *mask_p, const size_t num_bytes) |
Verify the contents of a buffer in memory. | |
int | test_NULL_Compare (const test_Test_Descriptor *td_p, const unsigned int actual, const char *desc) |
Check a 32-bit value to make sure it is not NULL. | |
int | test_Status_Compare (const test_Test_Descriptor *td_p, const unsigned int expect, const unsigned int actual, const char *func) |
Check a MSG status code value. | |
int | test_Status_Success (const test_Test_Descriptor *td_p, const unsigned int actual, const char *func) |
Check a MSG status code to make sure it's reporting success. | |
int | test_Value32_Compare (const test_Test_Descriptor *td_p, const unsigned int expect, const unsigned int actual, const char *desc) |
Check a 32-bit value. | |
void | test_Show_Item (const test_Test_Descriptor *td_p, const char *name, const char *fmt, const char *str_param, const unsigned int int_param) |
Display an item of data. | |
int | lim_unit_test (void) |
The unit test entry point. | |
int | main (void) |
The application entry point for the host version of the test. | |
Variables | |
test_Test_Descriptor | LIM_td |
Descriptor for the LIM unit test. |
** CVS $Id: lim_unit_test.c,v 1.37 2007/12/16 22:55:35 dmay Exp $ **
|
Start the messaging system.
|
|
Stop the messaging system.
|
|
The unit test entry point. Configures the test environment, runs the various subtests, collects the status values, and displays the results.
|
|
The application entry point for the host version of the test.
|
|
Display text with indentation. Display text with indentation appropriate for the specified test state level.
|
|
Display a message as a banner.
|
|
Display the current state description stack. Display all the state descriptions on the test's state stack.
|
|
Display the name for a status code.
|
|
Return a text description of a LIM action.
|
|
Verify command count values.
|
|
Delay the current task a number of microseconds.
|
|
Display a generic error message.
|
|
Return a text description of a GRB state.
|
|
Verify the contents of LIM information.
|
|
Verify the contents of a buffer in memory. This function verifies the contents of a memory buffer and reports an error if the values are not as expected. An optional mask can be used to indicate which bits should be verified.
|
|
Check a 32-bit value to make sure it is not NULL.
|
|
Return a text description of an operating mode.
|
|
Return a text description of an 'other' task state.
|
|
Verify simulated task start parameter values.
|
|
Return for a test state. Pop a test state description from a test's state stack.
|
|
Enter a new test state. Push a new test state description onto a test's state stack. This state stack provides a trace of the execution of the test.
|
|
Display text with indentation. Display text with indentation appropriate for the specified level.
|
|
Display LIM info.
|
|
Display an item of data. This function displays an item of data in a predefined format.
|
|
Indicate that the next error message is expected. Display text that indicates that the next error message is expected.
|
|
Display Slew-Request command parameters.
|
|
Sleep for the specified number of seconds.
|
|
Verify Slew-Request command parameters.
|
|
Check a MSG status code value. Compare actual and expected status code values and display a message if they differ.
|
|
Return a text description of a status code.
|
|
Check a MSG status code to make sure it's reporting success.
|
|
Check a 32-bit value. Compare actual and expected 32-bit values and display a message if they differ.
|
|
Handle wake-up timer expiration.
|