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_common.c File Reference

Common functions for LCS tests. More...

#include <stdio.h>
#include <string.h>
#include "PBS/FFS.ih"
#include "PBS/FPA.h"
#include "PBS/MBA.h"
#include "PBS/WCT.h"
#include "PBS/WUT.h"
#include "LCBD/LCB_cr.h"
#include "LCBD/LCBD_drv.h"
#include "LCBD/LCBC.h"
#include "IMM/FPM_pubdefs.h"
#include "ITC/ITC_drvdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCS/LCS_drvdefs.h"
#include "LCS/LCS_msgs.h"
#include "LCS_prvdefs.h"
#include "LCS_prvtest.h"

Include dependency graph for LCS_common.c:

Include dependency graph

Defines

#define LCS_L_CMD   ( 8 )
 Number of command buffers.

#define LCS_L_MSG   ( 16 )
 Number of message buffers.


Functions

FORK_cb_status fragmentSet (FORK_cb_prm *prm, FORK_msg_hdr *msg)
 Force a fragmentation.

WUT_cb_status fragmentTimer (void *prm, WUT_tmr *wut)
 Timer callback routine to queue a message back to a fork.

void * LRX_allocTest (ITC_Queue *queue, unsigned int siz, ITC_cb_Completion **rtn, void **cb0, void **cb1, void **cb2)
 Allocation plug-in (normal operation ... not testing).

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

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

void LCS_dumpRcv (ITC_TaskID tid, ITC_QueueID qid)
 Raw packet processing.

void LCS_clearRcv (ITC_TaskID tid, ITC_QueueID qid)
 Raw packet processing.

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_testAttach (ITC_TaskID tid)
 Attach LCS testability features to a task.

unsigned int LCS_testInitialize ()
 One time initialization of resources needed for LCS testing.

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).


Variables

LCS_TestControlLCS_tcb
 Control block for LCS testing.

LCS_Cmdcmd
 A command used in the fragmentation test.

unsigned int nomore
 Flag to discontinue the fragmenetation wake-up timer.


Detailed Description

Common functions for LCS tests.

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

Function Documentation

FORK_cb_status fragmentSet FORK_cb_prm *  prm,
FORK_msg_hdr *  msg
[static]
 

Force a fragmentation.

fragmentSet() sets the LCB CSR register to introduce a fragment.

Here is the call graph for this function:

WUT_cb_status fragmentTimer void *  prm,
WUT_tmr *  wut
[static]
 

Timer callback routine to queue a message back to a fork.

Parameters:
prm (in) User context parameter
wut (in) Timer handle
fragmentTimer() is the routine called at interrupt level by the timeout timer. It's responsible for getting the fragmentation flag set.

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:

void LCS_clearRcv ITC_TaskID  tid,
ITC_QueueID  qid
 

Raw packet processing.

Parameters:
tid (in) ITC task ID (-1 for all)
qid (in) ITC queue ID (-1 for all)
LCS_clearRcv() clears receive statistics

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_dumpRcv ITC_TaskID  tid,
ITC_QueueID  qid
 

Raw packet processing.

Parameters:
tid (in) ITC task ID
qid (in) ITC queue ID
LCS_dumpRcv() dumps out receive statistics

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_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_testAttach ITC_TaskID  tid  ) 
 

Attach LCS testability features to a task.

Parameters:
tid (in) Task to "instrument"

Here is the call graph for this function:

void * LRX_allocTest ITC_Queue *  queue,
unsigned int  siz,
ITC_cb_Completion **  rtn,
void **  cb0,
void **  cb1,
void **  cb2
 

Allocation plug-in (normal operation ... not testing).

Parameters:
queue (in) Queue handle
siz (in) Bytes to allocate
rtn (out) Memory deallocation callback routine
cb0 (out) Memory deallocation callback routine parameter 0
cb1 (out) Memory deallocation callback routine parameter 1
cb2 (out) Memory deallocation callback routine parameter 2
LRX_reset() performs common reset functions including checking for service shutdown handling.


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