GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCS / V1-2-1

Constituent: lcs_test     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

LCS_prvtest.h File Reference

Private definitons for test code entry points, etc. More...

#include "PBS/FORK.h"
#include "PBS/FPA.h"
#include "PBS/WUT.h"
#include "IMM/FPM_pubdefs.h"
#include "LCS/LCS_drvdefs.h"
#include "LCS/LCS_pubdefs.h"

Include dependency graph for LCS_prvtest.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Data Structures

struct  _LCS_Cmd
 Message structure that can be queued to a fork. More...

struct  _LCS_CmdParam
 Command parameters. More...

struct  _LCS_TestControl
 Control block for LCS testing. More...

struct  _LCS_TestQueue
 Message reception statistics. More...

struct  _LCS_TestTask
 Task block for LCS testing. More...


Defines

#define LCS_PAT_K_WORD   ( 0xdeafbede )
 Pattern word (detect overwrites ...).


Typedefs

typedef _LCS_CmdParam LCS_CmdParam
 Typedef for struct _LCS_CmdParam.

typedef _LCS_Cmd LCS_Cmd
 Typedef for struct _LCS_Cmd.

typedef _LCS_TestQueue LCS_TestQueue
 Typedef for struct _LCS_TestQueue.

typedef _LCS_TestTask LCS_TestTask
 Typedef for struct _LCS_TestTask.

typedef _LCS_TestControl LCS_TestControl
 Typedef for struct _LCS_TestControl.


Functions

unsigned int LCS_accumRcv (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len)
 Raw packet processing.

unsigned int LCS_copyRxEngine (ITC_NodeID nid, ITC_QueueID qid, LRX_Engine *rxe)
 Copy an LRX engine control block.

unsigned int LCS_copyTxEngine (ITC_TaskID tid, ITC_QueueID eid, LTX_Engine *txe)
 Copy an LTX engine control block.

void LCS_dumpHex (const void *buf, int bef, int aft)
 Simple hex dump.

void LCS_dumpRxDStats (LRX_Engine *beg, LRX_Engine *end)
 Dump out differential receiver statistics.

void LCS_dumpRxStats (LRX_Engine *rxe)
 Dump out the statistical instrumentation for an LRX engine.

void LCS_dumpTxDTiming (LTX_Engine *beg, LTX_Engine *end)
 Dump out differential timing for an LTX engine.

void LCS_dumpTxEngine (LTX_Engine *txe)
 Dump out the contents of an engine control block.

void LCS_dumpTxTiming (LTX_Engine *txe)
 Dump out the contents of an engine control block.

unsigned int LCS_fragment (ITC_NodeID dnid, ITC_TaskID dtid, ITC_QueueID dqid, ITC_ProtID pid, ITC_TaskID stid)
 Main routine for LCS message (hardware) fragmentation test.

void LCS_freeBuffer (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx)
 Free allocated buffer.

void LCS_freeCCSDS (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx)
 Free allocated buffer.

unsigned int LCS_integrity (ITC_NodeID dnid, ITC_TaskID dtid, ITC_QueueID dqid, ITC_ProtID pid, ITC_TaskID stid)
 Main routine for LCS protocol integrity tests.

unsigned int LCS_priority (ITC_NodeID dnid, ITC_TaskID dtid, ITC_QueueID qmin, ITC_QueueID qmax, ITC_TaskID stid)
 Main routine for LCS message through message test.

unsigned int LCS_sendCCSDS (unsigned int tst, unsigned int apid, int fst, int lst, int pgs, int beg, int end, ITC_cb_Completion *rtn, FPA_fcb *fcb, unsigned char *buf, LCS_Cmd *cmd)
 Send a message (no memory allocation).

unsigned int LCS_sendCPU (ITC_NodeID nid, ITC_TaskID tid, ITC_QueueID qid, ITC_ProtID pid, int pgs, int beg, int end)
 Send a message (automatic memory allocation).

unsigned int LCS_sendMessage (unsigned int tst, ITC_NodeID nid, ITC_TaskID tid, ITC_QueueID qid, ITC_ProtID pid, int pgs, int beg, int end, ITC_cb_Completion *rtn, FPA_fcb *fcb, unsigned char *buf, LCS_Cmd *cmd)
 Send a message (no memory allocation).

unsigned int LCS_sendSDI (unsigned int apid, int fst, int lst, int pgs, int beg, int end)
 Send a message (automatic memory allocation).

unsigned int LCS_speed (ITC_NodeID dnid, ITC_TaskID dtid, ITC_TaskID stid)
 Main routine for LCS message through message test.

unsigned int LCS_testLength (ITC_QueueID qid)
 Deliberately damage a message length.

unsigned int LCS_testSequence (ITC_QueueID qid, int tgt)
 Deliberately damage a packet sequence count.

unsigned int LCS_testStall (ITC_QueueID qid, int tgt)
 Deliberately stall a transmission.

unsigned int LCS_testTransaction (ITC_QueueID qid, int tgt)
 Deliberately damage a packet transaction number.


Variables

LCS_TestControlLCS_tcb
 Control block for LCS testing.


Detailed Description

Private definitons for test code entry points, etc.

CVS $Id: LCS_prvtest.h,v 1.6 2005/09/21 01:28:11 apw Exp $
Author:
A.P.Waite

Function Documentation

unsigned int LCS_accumRcv void *  prm,
const ITC_QueueItem *  qitem,
void *  pay,
unsigned int  len
 

Raw packet processing.

Parameters:
prm (in) User context parameter
qitem (in) Queue item
pay (in) Queue item payload pointer
len (in) Queue item payload length
Return values:
LCS_SUCCESS Success
LCS_accumRcv() receives raw packets for tLCS tests

Here is the call graph for this function:

unsigned int LCS_copyRxEngine ITC_NodeID  nid,
ITC_QueueID  qid,
LRX_Engine *  rxe
 

Copy an LRX engine control block.

Parameters:
nid (in) ITC node ID
qid (in) ITC queue ID
rxe (out) LRX engine control block
Return values:
LCS_GENERROR Failure (not reported)
LCS_SUCCESS Success

unsigned int LCS_copyTxEngine ITC_TaskID  tid,
ITC_QueueID  eid,
LTX_Engine *  txe
 

Copy an LTX engine control block.

Parameters:
tid (in) ITC task ID (for this service task)
eid (in) Engine ID
txe (out) LTX engine control block
Return values:
LCS_GENERROR Failure (not reported)
LCS_SUCCESS Success

void LCS_dumpHex const void *  buf,
int  bef,
int  aft
 

Simple hex dump.

Parameters:
buf Reference address
bef Offset from buf to begin dump (inclusive)
aft Offset from buf to end dump (exclusive)

void LCS_dumpRxDStats LRX_Engine *  beg,
LRX_Engine *  end
 

Dump out differential receiver statistics.

Parameters:
beg (in) LRX engine control block (period begin)
end (in) LRX engine control block (period end)

Here is the call graph for this function:

void LCS_dumpRxStats LRX_Engine *  rxe  ) 
 

Dump out the statistical instrumentation for an LRX engine.

Parameters:
rxe (in) LRX engine control block

void LCS_dumpTxDTiming LTX_Engine *  beg,
LTX_Engine *  end
 

Dump out differential timing for an LTX engine.

Parameters:
beg (in) LTX engine control block (period begin)
end (in) LTX engine control block (period end)

Here is the call graph for this function:

void LCS_dumpTxEngine LTX_Engine *  ecb  ) 
 

Dump out the contents of an engine control block.

Parameters:
ecb (in) Engine control block

void LCS_dumpTxTiming LTX_Engine *  txe  ) 
 

Dump out the contents of an engine control block.

Parameters:
txe (in) LTX engine control block

static unsigned int LCS_fragment ITC_NodeID  dnid,
ITC_TaskID  dtid,
ITC_QueueID  dqid,
ITC_ProtID  pid,
ITC_TaskID  stid
 

Main routine for LCS message (hardware) fragmentation test.

Parameters:
dnid (in) Destination ITC node ID
dtid (in) Destination ITC task ID
dqid (in) Destination ITC queue ID
pid (in) Message protocol
stid (in) Source ITC task ID
LCS_fragment() sends two messages. The first (short) message causes the receiver to set up a deliberate fragmentation (at semi-random times, sets a bit in the far side LCB's LATp CSR register). The second (long) message then stumbles into that situation.

Here is the call graph for this function:

void LCS_freeBuffer ITC_QueueItem *  qitem,
unsigned int  status,
void *  prm0,
void *  prm1,
void *  prm2,
unsigned int  tx
 

Free allocated buffer.

Parameters:
qitem (in) Queue item (unused)
status (in) Processing completion code (unused)
prm0 (in) User parameter 0 (unused)
prm1 (in) User parameter 1 (unused)
prm2 (in) User parameter 2 (unused)
tx (in) Tx/Rx free (1/0)
LCS_freeBuffer() frees a test packet.

Here is the call graph for this function:

void LCS_freeCCSDS ITC_QueueItem *  qitem,
unsigned int  status,
void *  prm0,
void *  prm1,
void *  prm2,
unsigned int  tx
 

Free allocated buffer.

Parameters:
qitem (in) Queue item (unused)
status (in) Processing completion code (unused)
prm0 (in) User parameter 0 (unused)
prm1 (in) User parameter 1 (unused)
prm2 (in) User parameter 2 (unused)
tx (in) Tx/Rx free (1/0)
LCS_freeBuffer() frees a test packet.

Here is the call graph for this function:

unsigned int LCS_integrity ITC_NodeID  dnid,
ITC_TaskID  dtid,
ITC_QueueID  dqid,
ITC_ProtID  pid,
ITC_TaskID  stid
 

Main routine for LCS protocol integrity tests.

Parameters:
dnid (in) Destination ITC node ID
dtid (in) Destination ITC task ID
dqid (in) Destination ITC queue ID
pid (in) Protocol ID
stid (in) Source ITC task ID
LCS_integrity() tests general message integrity by scanning through a large variety of message lengths and message alignments.

Here is the call graph for this function:

static unsigned int LCS_priority ITC_NodeID  dnid,
ITC_TaskID  dtid,
ITC_QueueID  qmin,
ITC_QueueID  qmax,
ITC_TaskID  stid
 

Main routine for LCS message through message test.

Parameters:
dnid (in) Destination ITC node ID
dtid (in) Destination ITC task ID
qmin (in) Queue to send the small message on
qmax (in) Queue to send the large message on
stid (in) Source ITC task ID
LCS_priority() sends a large, low priority message quickly followd (2 msec later) by a small high priority message.

Here is the call graph for this function:

unsigned int LCS_sendCCSDS unsigned int  tst,
unsigned int  apid,
int  fst,
int  lst,
int  pgs,
int  beg,
int  end,
ITC_cb_Completion *  rtn,
FPA_fcb *  fcb,
unsigned char *  buf,
LCS_Cmd cmd
 

Send a message (no memory allocation).

Parameters:
tst (in) Test ID
apid (in) APID
fst (in) If true, set the "first" bit in CCSDS sequence flags
lst (in) If true, set the "last" bit in CCSDS sequence flags
pgs (in) Number of 512 byte pages to send
beg (in) Offset from perfect alignment at send head
end (in) Offset from perfect alignment at send tail
rtn (in) ITC completion routine
fcb (in) FPA control block
buf (in) Message buffer
cmd (in) Command buffer (can be null)
Return values:
LCS_GENERROR Failure
LCS_SUCCESS Success

Here is the call graph for this function:

unsigned int LCS_sendCPU ITC_NodeID  nid,
ITC_TaskID  tid,
ITC_QueueID  qid,
ITC_ProtID  pid,
int  pgs,
int  beg,
int  end
 

Send a message (automatic memory allocation).

Parameters:
nid (in) Destination node ID
tid (in) Destination task ID
qid (in) Destination queue ID
pid (in) Hardware protocol ID
pgs (in) Number of 512 byte pages to send
beg (in) Offset from perfect alignment at send head
end (in) Offset from perfect alignment at send tail
Return values:
LCS_GENERROR Failure
LCS_SUCCESS Success

Here is the call graph for this function:

unsigned int LCS_sendMessage unsigned int  tst,
ITC_NodeID  nid,
ITC_TaskID  tid,
ITC_QueueID  qid,
ITC_ProtID  pid,
int  pgs,
int  beg,
int  end,
ITC_cb_Completion *  rtn,
FPA_fcb *  fcb,
unsigned char *  buf,
LCS_Cmd cmd
 

Send a message (no memory allocation).

Parameters:
tst (in) Test ID
nid (in) Destination node ID
tid (in) Destination task ID
qid (in) Destination queue ID
pid (in) Hardware protocol ID
pgs (in) Number of 512 byte pages to send
beg (in) Offset from perfect alignment at send head
end (in) Offset from perfect alignment at send tail
rtn (in) ITC completion routine
fcb (in) FPA control block
buf (in) Message buffer
cmd (in) Command buffer (can be null)
Return values:
LCS_GENERROR Failure
LCS_SUCCESS Success

Here is the call graph for this function:

unsigned int LCS_sendSDI unsigned int  apid,
int  fst,
int  lst,
int  pgs,
int  beg,
int  end
 

Send a message (automatic memory allocation).

Parameters:
apid (in) APID
fst (in) If true, set the "first" bit in CCSDS sequence flags
lst (in) If true, set the "last" bit in CCSDS sequence flags
pgs (in) Number of 512 byte pages to send
beg (in) Offset from perfect alignment at send head
end (in) Offset from perfect alignment at send tail
Return values:
LCS_GENERROR Failure
LCS_SUCCESS Success

Here is the call graph for this function:

unsigned int LCS_speed ITC_NodeID  dnid,
ITC_TaskID  dtid,
ITC_TaskID  stid
 

Main routine for LCS message through message test.

Parameters:
dnid (in) Destination ITC node ID
dtid (in) Destination ITC task ID
stid (in) Source ITC task ID
LCS_speed() sends four large (64k - 64 bytes) in quick succession and times throughput speed.

Here is the call graph for this function:

static unsigned int LCS_testLength ITC_QueueID  qid  ) 
 

Deliberately damage a message length.

Parameters:
qid (in) Queue/engine to corrupt
LCS_testLength() will deliberately damage the message length (make it too large) the next time a protocol 3 allocation request is sent.

Here is the call graph for this function:

static unsigned int LCS_testSequence ITC_QueueID  qid,
int  tgt
 

Deliberately damage a packet sequence count.

Parameters:
qid (in) Queue/engine to corrupt
tgt (in) Target packet to corrupt
Warning:
Only protocol 3 transactions make use of the sequence number, so the corruption set up here will be only be applied to the next protocol 3 transaction seen. Protocol 2 transactions are not affected (nor do they cancel this one-shot corruption).
LCS_testSequence() will deliberately damage the sequence count the next time it sees the sequence number tgt on queue/engine qid.

Here is the call graph for this function:

static unsigned int LCS_testStall ITC_QueueID  qid,
int  tgt
 

Deliberately stall a transmission.

Parameters:
qid (in) Queue/engine to stall
tgt (in) Target packet to stall
Warning:
Only protocol 3 transactions can be stalled (it makes no sense to stall the single packet of a protocol 2 transaction ... how does the receiver figure out that it didn't receive something which it never knew was coming!), so the corruption set up here will be only be applied to the next protocol 3 transaction seen. Protocol 2 transactions are not affected (nor do they cancel this one-shot corruption).
LCS_testStall() will deliberately stall transmission at the target packet.

Here is the call graph for this function:

static unsigned int LCS_testTransaction ITC_QueueID  qid,
int  tgt
 

Deliberately damage a packet transaction number.

Parameters:
qid (in) Queue/engine to corrupt
tgt (in) Target packet to corrupt
Warning:
Only protocol 3 transactions make use of the transaction number, so the corruption set up here will be only be applied to the next protocol 3 transaction seen. Protocol 2 transactions are not affected (nor do they cancel this one-shot corruption).
LCS_testTransaction() will deliberately damage the transaction number the next time it sees the sequence number tgt on queue/engine qid.

Here is the call graph for this function:


Generated on Tue Sep 20 21:46:47 2005 by doxygen 1.3.3