GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCS / dev > lcs_test / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LCS_robust.c File Reference

Test robustness. More...

#include <stdio.h>
#include <string.h>
#include <time.h>
#include <ITC/ITC_drvdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <LCS/LCS_msgs.h>
#include <LCS_prvdefs.h>
#include <LCS_prvtest.h>

Functions

static unsigned int length (void *prm, LTX_Engine *txe, LCBD_cl_event *cl)
 Corrupt the message length.
static unsigned int sequence (void *prm, LTX_Engine *txe, LCBD_cl_event *cl)
 The mis-sequence test point plug-in.
static unsigned int stall (void *prm, LTX_Engine *txe, LCBD_cl_event *cl)
 The stall test point plug-in.
static unsigned int transaction (void *prm, LTX_Engine *txe, LCBD_cl_event *cl)
 The transaction number test point plug-in.
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.


Detailed Description

Test robustness.

CVS $Id: LCS_robust.c,v 1.4 2011/03/28 22:49:56 apw Exp $
Author:
A.P.Waite

Function Documentation

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.

References length().

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.

References sequence().

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.

References stall().

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.

References transaction().

static unsigned int length ( void *  prm,
LTX_Engine *  txe,
LCBD_cl_event *  cl 
) [static]

Corrupt the message length.

Parameters:
prm (in) User parameter
txe (in) LTX transmit engine
cl (in) LCB command list

References LCS_PRT_M_END, LCS_PRT_M_OPCD, LCS_PRT_V_END, and LCS_PRT_V_OPCD.

Referenced by LCS_testLength().

static unsigned int sequence ( void *  prm,
LTX_Engine *  txe,
LCBD_cl_event *  cl 
) [static]

The mis-sequence test point plug-in.

Parameters:
prm (in) User parameter
txe (in) LTX transmit engine
cl (in) LCB command list

References LCS_PRT_M_END, LCS_PRT_M_OPCD, LCS_PRT_V_END, and LCS_PRT_V_OPCD.

Referenced by LCS_testSequence().

static unsigned int stall ( void *  prm,
LTX_Engine *  txe,
LCBD_cl_event *  cl 
) [static]

The stall test point plug-in.

Parameters:
prm (in) User parameter
txe (in) LTX transmit engine
cl (in) LCB command list

References LCS_PRT_M_END, LCS_PRT_M_OPCD, LCS_PRT_V_END, and LCS_PRT_V_OPCD.

Referenced by LCS_testStall().

static unsigned int transaction ( void *  prm,
LTX_Engine *  txe,
LCBD_cl_event *  cl 
) [static]

The transaction number test point plug-in.

Parameters:
prm (in) User parameter
txe (in) LTX transmit engine
cl (in) LCB command list

References LCS_PRT_M_END, LCS_PRT_M_OPCD, LCS_PRT_M_TRID, LCS_PRT_V_END, LCS_PRT_V_OPCD, and LCS_PRT_V_TRID.

Referenced by LCS_testTransaction().


Generated on Mon Mar 28 15:57:44 2011 by  doxygen 1.5.8