GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCI / V6-0-4 > LCI_test_cnt / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

test_p.h File Reference

Private includes for LCI testing. More...

#include <ITC/ITC_pubdefs.h>

Classes

struct  Test
 Structure holding a pointer to a test function and the title of the test. More...

Typedefs

typedef unsigned(* pTest )(void)
 Pointer to a function that performs a test.

Functions

unsigned LCI_test_catechise (void)
unsigned LCI_test_compiler (void)
unsigned LCI_test_transport (void)
unsigned cmd_calibrate (unsigned latccfg, unsigned lcicfg)
 Allocate, form and send a calibrate command to the LCI task.
unsigned cmd_abort (void)
 Allocate, form and send an abort command to the LCI task.
unsigned test_cue (void)
 Main test function for the cue tests.
void test_init (void)
 Setup and start ITC and MSG.
unsigned test_startTask (void)
 Start up the ITC task that will run the LCI control tests.
void test_stopTask (void)
 Stop the task started with test_startTask.
unsigned test_calibrate (unsigned latccfg, unsigned lcicfg)
 Queue a message to the test task that will initiate an LCI calibration, wait for the calibration to terminate and return the status.
unsigned test_send (unsigned latccfg, unsigned lcicfg)
 Queue a message to the test task that will initiate an LCI calibration.
void test_wait_cali (void)
 Wait for the calibration message to be sent.
unsigned test_wait_term (void)
 Wait for the terminated message to arrive and return the status.
unsigned int kick_test (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Release the semaphore if this this function is called in response to a message from the LCI task (termination message) otherwise send a calibrate command to the LCI task.


Detailed Description

Private includes for LCI testing.

Author:
James Swain & Owen Saxton
$Id: test_p.h,v 1.4 2011/03/29 19:34:34 saxton Exp $

Function Documentation

unsigned cmd_abort ( void   ) 

Allocate, form and send an abort command to the LCI task.

Returns:
Error code if any part of the command formation or transmission fails

References cmd(), and LCI_ABORT_FCODE.

unsigned cmd_calibrate ( unsigned  latccfg,
unsigned  lcicfg 
)

Allocate, form and send a calibrate command to the LCI task.

Parameters:
latccfg File ID for the LATC configuration file
lcicfg File ID for the LCI configuration file
Returns:
Error code if any part of the command formation or transmission fails

References cmd(), and LCI_CALIBRATE_FCODE.

Referenced by kick_test().

unsigned int kick_test ( void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len 
)

Release the semaphore if this this function is called in response to a message from the LCI task (termination message) otherwise send a calibrate command to the LCI task.

Parameters:
prm User defined parameter (NULL)
qitem Pointer to the item queued to this task
pay Pointer to the payload of the queued item
len Length of the payload.
Return values:
0 

References TestTask::cali, cmd_calibrate(), TestTask::latccfg, TestTask::lcicfg, TestTask::status, and TestTask::term.

Referenced by test_startTask().

unsigned test_calibrate ( unsigned  latccfg,
unsigned  lcicfg 
)

Queue a message to the test task that will initiate an LCI calibration, wait for the calibration to terminate and return the status.

Parameters:
latccfg File ID for the LATC configuration file
lcicfg File ID for the LCI configuratoin file
Returns:
An error code

References test_send(), and test_wait_term().

unsigned test_cue ( void   ) 

Main test function for the cue tests.

Return values:
Number of tests that failed

Referenced by main().

void test_init ( void   ) 

Setup and start ITC and MSG.

Referenced by main().

unsigned test_send ( unsigned  latccfg,
unsigned  lcicfg 
)

Queue a message to the test task that will initiate an LCI calibration.

Parameters:
latccfg File ID for the LATC configuration file
lcicfg File ID for the LCI configuratoin file
Returns:
An error code

!!! KLUDGE - pass a dummy payload into ITC_bind, 'cos it won't take NULL

References TestTask::latccfg, and TestTask::lcicfg.

Referenced by test_calibrate().

unsigned test_startTask ( void   ) 

Start up the ITC task that will run the LCI control tests.

Returns:
Failure status from one of the ITC functions or ITC_SUCCESS

References TestTask::cali, TestTask::itc, kick_test(), TestTask::status, TestTask::term, and test_stopTask().

void test_stopTask ( void   ) 

Stop the task started with test_startTask.

References TestTask::cali, TestTask::itc, and TestTask::term.

Referenced by test_startTask().

void test_wait_cali ( void   ) 

Wait for the calibration message to be sent.

References TestTask::cali.

unsigned test_wait_term ( void   ) 

Wait for the terminated message to arrive and return the status.

Returns:
Status from the terminated message

References TestTask::status, and TestTask::term.

Referenced by test_calibrate().


Generated on Tue Nov 29 16:54:34 2011 by  doxygen 1.5.8