GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCI / V6-0-1 > lci_test_cnt / rad750


Interface   Data Structures   File List   Data Fields   Globals  

test_task.c File Reference

Test task creation and manipulation. More...

#include "test_p.h"
#include "LCI/LCI_msgs.h"
#include "LEM/msg_macros.h"
#include "MSG/MSG_pubdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "PBS/SEM.h"
#include "PBS/BSWP.h"
#include <stdio.h>

Classes

struct  TestTask
 Task control block for the test task. More...

Enumerations

enum  { ITC_TID_LCI_T = 14 }

Functions

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.
unsigned test_wait_term (void)
 Wait for the terminated message to arrive and return the status.
void test_wait_cali (void)
 Wait for the calibration message to be sent.
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.

Variables

static char buffer [40]
static TestTask testTask


Detailed Description

Test task creation and manipulation.

To test LCI through the formal (ITC task) interface it is necessary to have another ITC task to provide "closed loop" communications. The TestTask is this ITC task.

Author:
James Swain & Owen Saxton
Id

Function Documentation

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 

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

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

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

unsigned test_wait_term ( void   ) 

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

Returns:
Status from the terminated message


Generated on Tue May 25 13:36:09 2010 by  doxygen 1.5.3