GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCBT / V1-4-1

Constituent: lcbt     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LCBT_event.c File Reference

LCB Event exercise tests. More...

#include "LCBT/LCBT.h"
#include "PBS/MBA.h"
#include "PBS/WCT.h"
#include "PBS/TMR.h"
#include "PBS/QI.h"
#include "PBS/TASK.h"
#include "PBS/FPA.h"
#include "PBS/FORK.h"
#include "PBS/CACHE.h"
#include "CCSDS/CCSDS_pkt.h"
#include "RND.h"
#include "LCBT_printf.h"
#include <string.h>

Include dependency graph for LCBT_event.c:

Include dependency graph

Functions

int LCBT_eventTest (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm)
 Test to send/recv/compare event data thru loopback on LCB board.

int LCBT_eventTest2 (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm)
 2 concurrent task test to send/recv/compare event data thru loopback on LCB board

int LCBT_eventTest3 (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm)
 3 concurrent task test to send/recv/compare event data thru loopback on LCB board

int LCBT_eventTest5 (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm)
 5 concurrent task test to send/recv/compare event data thru loopback on LCB board

int LCBT_comboTest (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm)
 2 concurrent tasks running event and localCmdReg test

int LCBT_eventWatermarkTest (int num, int latpAddr)
 Check for proper operation of watermarks on Event and EventData queues.

int LCBT_eventRecv (int numRecv, int ccsds)
 Setup to receive and compare data from LCBT_eventSend().

int LCBT_eventSend (int numEvents, int maxEvtSize, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm)
 Send out test event data to be received by LCBT_eventRecv().

int LCBT_eventSendDelay (int delayNanosec)
 Set delay in nanoSec between event sends, can be 0.

void LCBT_eventCorrupt (unsigned int delayNanoSec, int numCorrupt, int corruptSize, unsigned int corruptVal)
 corrupt data in the circular event data

int LCBT_eventInit (int echoForkPri)
 Setup module in this file to echo event data back to sender.

int LCBT_eventFillTest (int num, int latpAddr, int buffSize32, int printInfo)
 Check for proper operation circular buffFUll interrupt.


Detailed Description

LCB Event exercise tests.

Author:
Ed Bacho -- ebacho@slac.stanford.edu

Function Documentation

int LCBT_comboTest int  num,
int  maxLen,
int  latpAddr,
int  randomLen,
int  ccsds,
TDATA_DTEST  testType,
unsigned int  testParm
 

2 concurrent tasks running event and localCmdReg test

Parameters:
num number of events to send
maxLen max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767
latpAddr - LATp address of board to send to, 0=self
randomLen 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize
ccsds 1=put CCSDS header on data sent out as event
testType Specifies the data sequence for test
testParm Parm to use with testType
Returns:
none
This test is intended to run when loopback cable is attached to LCB board ir the LCB is connected to a GASU. Test combines localCmdReg test and event test to prove board properly handles this case. Both these tests use the Cmd list and send to the Request Queue. Num should be set to a high value to guarantee overlap of tests.

Here is the call graph for this function:

void LCBT_eventCorrupt unsigned int  delayNanoSec,
int  numCorrupt,
int  corruptSize32,
unsigned int  corruptVal
 

corrupt data in the circular event data

Parameters:
delayNanoSec delay between corruptions
numCorrupt number of corruptions bfore stopping
corruptSize32 size of corruption in int32
corruptVal int32 value to write when corrupting
Returns:
none
This function is intended as a check to make sure that test code can detect corrupted data in the circular event buffer by randomly corrupting data in the buffer.

Here is the call graph for this function:

int LCBT_eventFillTest int  num,
int  latpAddr,
int  buffSize32,
int  printInfo
 

Check for proper operation circular buffFUll interrupt.

Parameters:
num Number of times to do the test
latpAddr - LATp address of board to send to, 0=self
printInfo print irq and other info while processing
buffSize32 buffSize to send, must be multiple of 32 to match EBM, min is 128
Returns:
0=sucess, otherwise returns number of failed tests
This tests the circEvtBuff full interrupt by filling the event buffer but not freeing the buffer. It checks that the proper interrupt sequence occurs when the last event is added to cause it to go full.

Here is the call graph for this function:

int LCBT_eventInit int  echoForkPri  ) 
 

Setup module in this file to echo event data back to sender.

Parameters:
echoForkPri priority of forked task to send event data back
Returns:
none

int LCBT_eventRecv int  numRecv,
int  ccsds
 

Setup to receive and compare data from LCBT_eventSend().

Parameters:
numRecv 0=sets up and return, 1=waits for numRecv events
ccsds 1=expect CCSDS header on event data received
Returns:
none
This test sets up the receive end for data from LCBT_eventSend(). The data received is self describing so compares can be dome on it.

int LCBT_eventSend int  numEvents,
int  maxEvtSize,
int  latpAddr,
int  randomLen,
int  ccsds,
TDATA_DTEST  testType,
unsigned int  testParm
 

Send out test event data to be received by LCBT_eventRecv().

Parameters:
numEvents number of events to send
maxEvtSize max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767
latpAddr - LATp address of board to send to, 0=self
randomLen 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize
ccsds 1=put CCSDS header on data sent out as event
testType Specifies the data sequence for test
testParm Parm to use with testType
Returns:
none
This test creates and send self-describing test data over the event fabric. The len of the event packet is random over legal values. This routine is usually not called directly since it does not call LCBT_eventRecv. LCBT_eventRecv() sets up LCB to receive and interpret the data packets sent by LCBT_eventSend()

Here is the call graph for this function:

int LCBT_eventSendDelay int  delayNanosec  ) 
 

Set delay in nanoSec between event sends, can be 0.

Parameters:
delayNanosec delay in nanoSec
Returns:
previous setting of delay
Sets s delay between eventSend's to avoid filling up queues.

int LCBT_eventTest int  num,
int  maxLen,
int  latpAddr,
int  randomLen,
int  ccsds,
TDATA_DTEST  testType,
unsigned int  testParm
 

Test to send/recv/compare event data thru loopback on LCB board.

Parameters:
num number of events to send
maxLen max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767
latpAddr - LATp address of board to send to, 0=self
randomLen 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize
ccsds 1=put CCSDS header on data sent out as event
testType Specifies the data sequence for test
testParm Parm to use with testType
Returns:
none
This test is intended to run with either a loopback cable attached to LCB board, or an LCB connected to a GASU. Events are sent in random legal sizes. The latpAddr should be the addr of the sending LCB or the address of another CPU/LCB running an echo server.

Here is the call graph for this function:

int LCBT_eventTest2 int  num,
int  maxLen,
int  latpAddr,
int  randomLen,
int  ccsds,
TDATA_DTEST  testType,
unsigned int  testParm
 

2 concurrent task test to send/recv/compare event data thru loopback on LCB board

Parameters:
num number of events to send
maxLen max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767
latpAddr - LATp address of board to send to, 0=self
randomLen 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize
ccsds 1=put CCSDS header on data sent out as event
testType Specifies the data sequence for test
testParm Parm to use with testType
Returns:
none
Test is similar to LCBT_eventTest except two tasks are spawned to do the same test. Num should be set to a high value to guarantee overlap of tests.

Here is the call graph for this function:

int LCBT_eventTest3 int  num,
int  maxLen,
int  latpAddr,
int  randomLen,
int  ccsds,
TDATA_DTEST  testType,
unsigned int  testParm
 

3 concurrent task test to send/recv/compare event data thru loopback on LCB board

Parameters:
num number of events to send
maxLen max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767
latpAddr - LATp address of board to send to, 0=self
randomLen 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize
ccsds 1=put CCSDS header on data sent out as event
testType Specifies the data sequence for test
testParm Parm to use with testType
Returns:
none
Test is similar to LCBT_eventTest except three tasks are spawned to do the same test. Num should be set to a high value to guarantee overlap of tests.

Here is the call graph for this function:

int LCBT_eventTest5 int  num,
int  maxLen,
int  latpAddr,
int  randomLen,
int  ccsds,
TDATA_DTEST  testType,
unsigned int  testParm
 

5 concurrent task test to send/recv/compare event data thru loopback on LCB board

Parameters:
num number of events to send
maxLen max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767
latpAddr - LATp address of board to send to, 0=self
randomLen 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize
ccsds 1=put CCSDS header on data sent out as event
testType Specifies the data sequence for test
testParm Parm to use with testType
Returns:
none
Test is similar to LCBT_eventTest except three tasks are spawned to do the same test. Num should be set to a high value to guarantee overlap of tests.

Here is the call graph for this function:

int LCBT_eventWatermarkTest int  num,
int  latpAddr
 

Check for proper operation of watermarks on Event and EventData queues.

Parameters:
num Number of times to do the test
latpAddr - LATp address of board to send to, 0=self
Returns:
0=sucess, otherwise returns number of failed tests
This test checks that the watermark event come when expected given the settings of the watermarks on the queues.

Here is the call graph for this function:


Generated on Wed Jan 19 21:29:16 2005 by doxygen 1.3.3