GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCS / V1-5-6 > lcs / rhel6-32
#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>
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. |
CVS $Id: LRX_service.c,v 1.13 2011/03/28 22:49:57 apw Exp $
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).
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 |
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.
Referenced by LRX_createService().
static unsigned int LRX_allocQueueItem | ( | LRX_Engine * | rxe, | |
LCS_ProtocolCPU * | hdr | |||
) | [static] |
Allocate an ITC queue item in which to assemble a message.
rxe | (in) LRX receive engine | |
hdr | (in) LCS header block |
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 |
References _LRX_Service::allocRtn, _LCS_ProtocolCPU::dat, _LRX_Engine::lrx, _LRX_Engine::qiend, _LRX_Engine::qilen, _LRX_Engine::qinxt, _LRX_Engine::qipay, _LRX_Engine::qitem, and _LCS_Data::ui.
Referenced by LRX_process().
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.
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) |
References _LRX_Engine::cnt, LRX_CNT_OVERRUN_ERR, LRX_CNT_UNDERRUN_ERR, _LRX_Engine::qiend, _LRX_Engine::qinxt, and _LRX_Engine::qipkt.
Referenced by LRX_process().
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.
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) |
0 | Always |
References _LRX_Engine::cnt, _LCS_ProtocolCPU::dat, _LRX_Engine::frg, _LRX_Engine::key, LCS_getNodeID(), LCS_lcb, LCS_OPCD_SEND, LCS_PRT_M_END, LCS_PRT_M_KEY, LCS_PRT_M_SNID, LCS_PRT_M_TRID, LCS_PRT_V_KEY, LCS_PRT_V_OPCD, LCS_PRT_V_SNID, _LCS_ProtocolCPU::lcsp, _LCS_Control::lrx, LRX_allocQueueItem(), LRX_CNT_ALLOCATION_ERR, LRX_CNT_DISPATCH_ERR, LRX_CNT_FRG_CNT_ERR, LRX_CNT_FSM_ACTIVE_ERR, LRX_CNT_FSM_READY_ERR, LRX_CNT_PACKET, LRX_CNT_RQALOC, LRX_CNT_SEQ_CNT_ERR, LRX_CNT_SHARD, LRX_CNT_TRANSACTION_ERR, LRX_copyContribution(), LRX_M_OR_P2, LRX_M_OR_P3, LRX_M_OR_READY, LRX_M_OR_SHARD, LRX_M_P2_PACKET, LRX_M_P2_SHARD, LRX_M_P3_ALLOC, LRX_M_P3_PACKET, LRX_M_P3_SHARD, LRX_M_STOPPED, LRX_replySend(), LRX_reset(), _LRX_Engine::nxt, _LRX_Engine::pkt, _LRX_Engine::qiend, _LRX_Engine::qinxt, _LRX_Engine::qipkt, _LRX_Engine::qitem, _LRX_Service::rxe, _LRX_Service::sav, _LRX_Engine::seq, _LCS_Data::ui, and _LCS_Data::us.
Referenced by LRX_service2(), and LRX_service3().
static void LRX_replyDispatch | ( | LCS_ProtocolCPU * | hdr | ) | [static] |
Forward a reply packet to the task/transmission engine.
hdr | (in) LCS header block |
References _LCS_ProtocolCPU::dat, _LCS_Reply::hdr, LCS_lcb, LCS_OPCD_ALLOC, LCS_OPCD_SEND, LCS_PRT_M_OPCD, LCS_PRT_M_SNID, LCS_PRT_M_SQID, LCS_PRT_M_STID, LCS_PRT_V_OPCD, LCS_PRT_V_SNID, LCS_PRT_V_SQID, LCS_PRT_V_STID, _LCS_ProtocolCPU::lcsp, _LCS_Control::lrx, LTX_allocReply(), LTX_sendReply(), _LRX_Engine::msg, _LRX_Service::rxe, and _LCS_Data::ui.
Referenced by LRX_service3().
static void LRX_replySend | ( | LRX_Engine * | rxe, | |
LCS_ProtocolCPU * | hdr, | |||
unsigned int | status | |||
) | [static] |
Reply to requester (either memory allocation or last packet).
rxe | (in) LRX receive engine | |
hdr | (in) LCS header from packet being replied to | |
status | (in) Completion code |
References _LCS_ProtocolCPU::dat, _LRX_Engine::fcb, LCS_getNodeAddress(), LCS_K_CL_HDR, LCS_PRT_M_RSP, LCS_PRT_M_SNID, LCS_PRT_V_SNID, _LCS_ProtocolCPU::lcsp, LRX_replySent(), _LRX_Engine::rof, and _LCS_Data::ui.
Referenced by LRX_process().
static unsigned int LRX_replySent | ( | void * | prm, | |
LCBD_xcb * | xcb | |||
) | [static] |
LCB result item processor for a LCS reply packet.
prm | (in) User parameter | |
xcb | (in) LCB driver xcb block |
References _LRX_Engine::fcb, LCS_L_DATEASCII, LCS_lcb, LCS_wct2ascii(), _LCS_Control::nto, _LCS_Control::rwi, and _LCS_Control::tto.
Referenced by LRX_replySend().
static void LRX_reset | ( | LRX_Service * | lrx, | |
LRX_Engine * | rxe | |||
) | [inline, static] |
Copy the incoming fragment to the output buffering.
lrx | (in) LRX service control block | |
rxe | (in) LRX receive engine |
References _LRX_Service::cb2, _LRX_Service::cb3, _LRX_Engine::frg, _LRX_Engine::key, LCS_lcb, LCS_SVC_INITIALIZED, LCS_SVC_STOPPING, _LCS_Control::lrx, LRX_M_OR_READY, LRX_M_STOPPED, _LRX_Engine::nxt, _LRX_Service::rxe, _LRX_Engine::seq, _LRX_Service::state, _LRX_Service::stopPrm, and _LRX_Service::stopRtn.
Referenced by LRX_process().
unsigned int LRX_service2 | ( | void * | prm, | |
unsigned int | dsc, | |||
LCBD_evt * | evt | |||
) |
Service LCB protocol 2 messages.
prm | (in) User context parameter | |
dsc | (in) Uninterpreted event descriptor | |
evt | (in) Event |
0 | Always |
References _LRX_Service::broken, LRX_K_PROT2, LRX_M_P2_PACKET, LRX_M_P2_SHARD, and LRX_process().
Referenced by LRX_startService().
unsigned int LRX_service3 | ( | void * | prm, | |
unsigned int | dsc, | |||
LCBD_evt * | evt | |||
) |
Service LCB protocol 2 messages.
prm | (in) User context parameter | |
dsc | (in) Uninterpreted event descriptor | |
evt | (in) Event |
0 | Always |
References _LRX_Service::broken, _LCS_ProtocolCPU::dat, LCS_OPCD_ALLOC, LCS_PRT_M_OPCD, LCS_PRT_M_RSP, LCS_PRT_V_OPCD, _LCS_ProtocolCPU::lcsp, LRX_K_PROT3, LRX_M_P3_ALLOC, LRX_M_P3_PACKET, LRX_M_P3_SHARD, LRX_process(), and LRX_replyDispatch().
Referenced by LRX_startService().
static const char * sequencing_txt[5] [static] |
Initial value:
{ s_packet, s_fragment, s_packet, s_fragment, s_alloc }