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

Constituent: lcs     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LRX_service.c File Reference

LCB driver callback routines. More...

#include <string.h>
#include "PBS/FFS.ih"
#include "MSG/MSG_pubdefs.h"
#include "ITC/ITC_drvdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCBD/LATP.h"
#include "LCBD/LCBC.h"
#include "LCBD/LCBD_drv.h"
#include "LCBD/LCBD_evt.h"
#include "LCS/LCS_drvdefs.h"
#include "LCS/LCS_msgs.h"
#include "LCS_prvdefs.h"

Include dependency graph for LRX_service.c:


Defines

#define LRX_K_CL_PAY   ( LCS_K_CL_HDR + sizeof( LCS_ProtocolCPU ) )
 Offset in command list to message payload.
#define LRX_K_CL_SIZE   ( ( LRX_K_CL_PAY + 0x07 ) >> 3 )
 Size of a single cell command list.

Functions

static unsigned int LRX_allocQueueItem (LRX_Engine *rxe, LCS_ProtocolCPU *hdr)
 Allocate an ITC queue item in which to assemble a message.
static unsigned int LRX_copyContribution (unsigned int dsc, LRX_Engine *rxe, LCS_ProtocolCPU *hdr, unsigned int truncated, unsigned int incomplete, unsigned int sdx)
 Copy the incoming fragment to the output buffering.
static unsigned int LRX_process (LRX_Service *lrx, unsigned int dsc, LCBD_evt *evt, unsigned int category, unsigned int fragment, unsigned int truncated, unsigned int sdx)
 Service LCB protocol 3 messages.
static void LRX_replyDispatch (LCS_ProtocolCPU *hdr)
 Forward a reply packet to the task/transmission engine.
static void LRX_replySend (LRX_Engine *rxe, LCS_ProtocolCPU *hdr, unsigned int status)
 Reply to requester (either memory allocation or last packet).
static unsigned int LRX_replySent (void *prm, LCBD_xcb *xcb)
 LCB result item processor for a LCS reply packet.
static void LRX_reset (LRX_Service *lrx, LRX_Engine *rxe)
 Copy the incoming fragment to the output buffering.
unsigned int LRX_service2 (void *prm, unsigned int dsc, LCBD_evt *evt)
 Service LCB protocol 2 messages.
unsigned int LRX_service3 (void *prm, unsigned int dsc, LCBD_evt *evt)
 Service LCB protocol 2 messages.
void * LRX_allocNormal (ITC_Queue *queue, unsigned int siz, ITC_cb_Completion **rtn, void **cb0, void **cb1, void **cb2)
 Allocation plug-in (normal operation ... not testing).

Variables

static const char s_packet [] = "packet"
 The string "packet".
static const char s_fragment [] = "fragment"
 The string "fragment".
static const char s_alloc [] = "allocation request"
 The string "allocation request".
static const int sequencing_prt [5] = { 2, 2, 3, 3, 3 }
 Map from packet sequence type to protocol.
static const char * sequencing_txt [5]
 Map from packet sequence type to text string.

Detailed Description

LCB driver callback routines.

CVS $Id: LRX_service.c,v 1.7 2005/09/21 01:28:12 apw Exp $
Author:
A.P.Waite

Function Documentation

void* LRX_allocNormal 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_allocNormal() is the canonical method for LCS to allocate memory from a destination task/queue using the memory management that the destination task has set up.

This routine is constructed as a plug-in so that the LCS test suite can substitute in a more elaborate allocator complete with buffer pre-painting and other such test-only gizmos.

static unsigned int LRX_allocQueueItem LRX_Engine rxe,
LCS_ProtocolCPU hdr
[static]
 

Allocate an ITC queue item in which to assemble a message.

Parameters:
rxe (in) LRX receive engine
hdr (in) LCS header block
Return values:
LCS_DSTALLOC Allocation failed for destination node/task/queue
LCS_DSTBIND ITC bind failed for destination node/task/queue
LCS_DSTQUEUE No queue for destination node/task/queue
LCS_SUCCESS Success
LRX_allocQueueItem() allocates an ITC queue item in which to assemble a message.

static unsigned int LRX_copyContribution unsigned int  dsc,
LRX_Engine rxe,
LCS_ProtocolCPU hdr,
unsigned int  truncated,
unsigned int  incomplete,
unsigned int  sdx
[inline, static]
 

Copy the incoming fragment to the output buffering.

Parameters:
dsc (in) Event descriptor (from LCB)
rxe (in) LRX receive engine
hdr (in) LCS header block for the contributing packet
truncated (in) Packet truncated flag
incomplete (in) Transaction incomplete flag
sdx (in) Statistics index (0/1 <=> protocol 2/protocol 3)
LRX_copyContribution() copies from the incoming LCB message to the queue item being prepared for dispatch. This routine is really just a super-macro.

static unsigned int LRX_process LRX_Service lrx,
unsigned int  dsc,
LCBD_evt *  evt,
unsigned int  category,
unsigned int  fragment,
unsigned int  truncated,
unsigned int  sdx
[static]
 

Service LCB protocol 3 messages.

Parameters:
lrx (in) LCS receive service pointer
dsc (in) Uninterpreted event descriptor
evt (in) Event
category (in) Packet category
fragment (in) Packet fragment sequence count
truncated (in) Packet truncated flag
sdx (in) Statistics index (0/1 <=> protocol 2/protocol 3)
Return values:
0 Always

static void LRX_replyDispatch LCS_ProtocolCPU hdr  )  [static]
 

Forward a reply packet to the task/transmission engine.

Parameters:
hdr (in) LCS header block
LRX_replyDispatch() handles all replies coming back from remote handlers and dispatches them to the fork queue indicated by the LCS/ITC header block.

static void LRX_replySend LRX_Engine rxe,
LCS_ProtocolCPU hdr,
unsigned int  status
[static]
 

Reply to requester (either memory allocation or last packet).

Parameters:
rxe (in) LRX receive engine
hdr (in) LCS header from packet being replied to
status (in) Completion code
LRX_replySend() sends an reply to a requester. Replies are only generated for protocol 3 transactions. Replies are generated when:
  • A remote sender makes a memory allocation request
  • A transaction has been completely received and dispatched

static unsigned int LRX_replySent void *  prm,
LCBD_xcb *  xcb
[static]
 

LCB result item processor for a LCS reply packet.

Parameters:
prm (in) User parameter
xcb (in) LCB driver xcb block
LRX_replySent() handles the result item generated by the LCB driver when the driver completes the sending of an reply packet.

static void LRX_reset LRX_Service lrx,
LRX_Engine rxe
[inline, static]
 

Copy the incoming fragment to the output buffering.

Parameters:
lrx (in) LRX service control block
rxe (in) LRX receive engine
LRX_reset() performs common reset functions including checking for service shutdown handling.

unsigned int LRX_service2 void *  prm,
unsigned int  dsc,
LCBD_evt *  evt
 

Service LCB protocol 2 messages.

Parameters:
prm (in) User context parameter
dsc (in) Uninterpreted event descriptor
evt (in) Event
Return values:
0 Always

unsigned int LRX_service3 void *  prm,
unsigned int  dsc,
LCBD_evt *  evt
 

Service LCB protocol 2 messages.

Parameters:
prm (in) User context parameter
dsc (in) Uninterpreted event descriptor
evt (in) Event
Return values:
0 Always


Variable Documentation

static const char * sequencing_txt[5] [static]
 

Initial value:

{
    s_packet,
    s_fragment,
    s_packet,
    s_fragment,
    s_alloc
}
Map from packet sequence type to text string.


Generated on Thu Apr 27 21:28:52 2006 by  doxygen 1.4.4