GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCS / V1-4-0
Constituent: lcs     Tag: linux-gcc
#include "PBS/FORK.h"
#include "PBS/FPA.h"
#include "PBS/MTX.h"
#include "PBS/RW.ih"
#include "PBS/WUT.h"
#include "ITC/ITC_pubdefs.h"
#include "LCBD/LCBD_cr.h"
#include "LCBD/LCBD_evt.h"
#include "LCS/LCS_pubdefs.h"
Include dependency graph for LCS_prvdefs.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _LCS_ProtocolSDI |
Structure to describe the CPU/SDI protocol header. More... | |
struct | _LCS_ContextSDI |
Structure to save extra context the CPU/SDI protocol header. More... | |
struct | _LCS_HeaderSDI |
Structure incorporating both CPU/SDI protocol and extra context. More... | |
union | _LCS_Data |
Various ways of accessing the LCS_ProtocolCPU payload word. More... | |
struct | _LCS_ProtocolCPU |
Structure to describe the CPU/CPU protocol header. More... | |
struct | _LCS_ContextCPU |
Structure to save extra context the CPU/CPU protocol header. More... | |
struct | _LCS_HeaderCPU |
Structure incorporating both CPU/SDI protocol and extra context. More... | |
union | _LCS_Protocol |
Union of the possible LCS protocols. More... | |
union | _LCS_Header |
Union of the possible LCS header formats. More... | |
struct | _LCS_Reply |
Message structure that can be queued to a fork. More... | |
struct | _LCS_Timeout |
Message structure that can be queued to a fork. More... | |
struct | _LRX_Engine |
Structure to hold LCS receive engine information. More... | |
struct | _LRX_Service |
Structure to hold LCS receive service information. More... | |
struct | _LTX_Adapter |
Structure to describe a protocol adapter's size and callbacks. More... | |
struct | _LTX_Sync |
Synchronization structure for an LTX engine. More... | |
struct | _LTX_Timing |
Timing/performance instrumentation block. More... | |
struct | _LTX_Engine |
Structure to hold LCS transmit engine information. More... | |
struct | _LTX_Service |
Structure to hold LCS transmit service information. More... | |
struct | _LCS_Control |
LCS control block. More... | |
Defines | |
#define | LCS_K_HARDBASE ( 0x21 ) |
Base of CPU hardware addresses on EBM. | |
#define | LCS_K_CL_HDR ( sizeof( LCBD_cl_event ) - sizeof( unsigned int ) ) |
Offset in command list to protocol header. | |
#define | LCS_M_RL_ALIGN ( LCB_RESULT_LIST_ALIGN - 1 ) |
Required result list alignment (as mask). | |
#define | LCS_K_RL_SIZE ( ( sizeof( LCBD_rl_event ) + 0x07 ) >> 3 ) |
Size of a single item result list. | |
#define | LRX_K_PROT2 ( ITC_PID_NOACK - ITC_K_PROTS ) |
Index for protocol 2 receive statistics. | |
#define | LRX_K_PROT3 ( ITC_PID_ACK - ITC_K_PROTS ) |
Index for protocol 3 receive statistics. | |
#define | LRX_M_P2_PACKET ( 0x0001 ) |
Protocol 2 packet (fragment sequence == 0). | |
#define | LRX_M_P2_SHARD ( 0x0002 ) |
Protocol 2 shard (fragment sequence != 0). | |
#define | LRX_M_P3_PACKET ( 0x0004 ) |
Protocol 3 packet (fragment sequence == 0). | |
#define | LRX_M_P3_SHARD ( 0x0008 ) |
Protocol 3 shard (fragment sequence != 0). | |
#define | LRX_M_P3_ALLOC ( 0x0010 ) |
Protocol 3 allocation request. | |
#define | LRX_M_STOPPED ( 0x0020 ) |
Receive engine is stopped. | |
#define | LRX_M_OR_P2 ( LRX_M_P2_PACKET | LRX_M_P2_SHARD ) |
Protocol 2 packet or shard. | |
#define | LRX_M_OR_P3 ( LRX_M_P3_PACKET | LRX_M_P3_SHARD ) |
Protocol 3 packet or shard. | |
#define | LRX_M_OR_SHARD ( LRX_M_P2_SHARD | LRX_M_P3_SHARD ) |
Protocol 2 or 3 shard. | |
#define | LRX_M_OR_READY ( LRX_M_P2_PACKET | LRX_M_P3_ALLOC ) |
Protocol 2 packet or protocol 3 allocation. | |
#define | LTX_L_PAGES ( 8 ) |
Maximum pages per packet (plus one). | |
#define | LTX_K_PAGE ( 9 ) |
Number of bits in page address. | |
#define | LTX_M_PAGE ( ( 1 << LTX_K_PAGE ) - 1 ) |
Mask of page addressing bits. | |
#define | LTX_M_SDI_APID ( 0x07ff ) |
Extract APID from CCSDS header. | |
#define | LTX_M_SDI_END ( 0x8000 ) |
Extract end sequence bit from CCSDS header. | |
#define | LTX_M_SDI_BEG ( 0x4000 ) |
Extract begin sequence bit from CCSDS header. | |
#define | LTX_M_SDI_SEQ ( 0x3fff ) |
Extract sequence number from CCSDS header. | |
#define | LTX_K_PAD_OVR ( 4 ) |
Number of bits to count oversend. | |
#define | LTX_K_PAD_SEQ ( 10 ) |
Number of bits to sequence within transaction. | |
#define | LTX_K_PAD_END ( 1 ) |
Number of bits to indicate transaction end. | |
#define | LTX_K_PAD_BEG ( 1 ) |
Number of bits to indicate transaction begin. | |
#define | LTX_V_PAD_OVR ( 0 ) |
Bit offset to the count oversend. | |
#define | LTX_V_PAD_SEQ ( LTX_V_PAD_OVR + LTX_K_PAD_OVR ) |
Bit offset to sequence within transaction. | |
#define | LTX_V_PAD_END ( LTX_V_PAD_SEQ + LTX_K_PAD_SEQ ) |
Bit offset to transaction end flag. | |
#define | LTX_V_PAD_BEG ( LTX_V_PAD_END + LTX_K_PAD_END ) |
Bit offset to transaction begin flag. | |
#define | LTX_M_PAD_OVR ( ( ( 1 << LTX_K_PAD_OVR ) - 1 ) ) |
In place mask for the count oversend. | |
#define | LTX_M_PAD_SEQ ( ( ( 1 << LTX_K_PAD_SEQ ) - 1 ) << LTX_V_PAD_SEQ ) |
In place mask for sequence count. | |
#define | LTX_M_PAD_END ( ( ( 1 << LTX_K_PAD_END ) - 1 ) << LTX_V_PAD_END ) |
In place mask for transaction end flag. | |
#define | LTX_M_PAD_BEG ( ( ( 1 << LTX_K_PAD_BEG ) - 1 ) << LTX_V_PAD_BEG ) |
In place mask for transaction begin flag. | |
#define | LCS_K_OPCODES (1) |
Base of operation code range. | |
#define | LCS_L_OPCODES (2) |
Length of operation code range. | |
#define | LCS_L_SVC_STATES (4) |
Number of states an LCS service can be in. | |
#define | LCS_L_CTL_STATES (2) |
Number of LCS control states. | |
#define | LRX_L_COUNTERS (12) |
Number of statistics counters. | |
#define | LTX_L_ADAPTERS (3) |
Number of LTX protocol adapters. | |
#define | LTX_L_ENG_STATES (3) |
Number of states an LCS transmit engine can be in. | |
Typedefs | |
typedef enum _LCS_OpCode | LCS_OpCode |
Typedef for enum _LCS_OpCode. | |
typedef enum _LCS_ServiceState | LCS_ServiceState |
Typedef for enum _LCS_ServiceState. | |
typedef enum _LCS_ControlState | LCS_ControlState |
Typedef for enum _LCS_ControlState. | |
typedef enum _LRX_Counter | LRX_Counter |
Typedef for enum _LRX_Counter. | |
typedef enum _LTX_AdapterList | LTX_AdapterList |
Typedef for enum _LTX_AdapterList. | |
typedef enum _LTX_EngineState | LTX_EngineState |
Typedef for enum _LTX_EngineState. | |
typedef unsigned int | LTX_cb_Start (struct _LTX_Engine *txe) |
Signature for the start routine of an adapter. | |
typedef void | LTX_cb_Header (struct _LTX_Engine *txe, unsigned int siz) |
Signature for the header construction routine of an adapter. | |
typedef FORK_cb_status | LTX_cb_Next (LTX_Engine *txe) |
Signature for a synchronize callable routine. | |
typedef unsigned int | LTX_cb_Test (void *prm, LTX_Engine *txe, LCBD_cl_event *cl) |
Signature for an LCS transmit test point callback routine. | |
typedef _LCS_ProtocolSDI | LCS_ProtocolSDI |
Typedef for struct _LCS_ProtocolSDI. | |
typedef _LCS_ContextSDI | LCS_ContextSDI |
Typedef for struct _LCS_ContextSDI. | |
typedef _LCS_HeaderSDI | LCS_HeaderSDI |
Typedef for struct _LCS_HeaderSDI. | |
typedef _LCS_Data | LCS_Data |
Typedef for union _LCS_Data. | |
typedef _LCS_ProtocolCPU | LCS_ProtocolCPU |
Typedef for struct _LCS_ProtocolCPU. | |
typedef _LCS_ContextCPU | LCS_ContextCPU |
Typedef for struct _LCS_ContextCPU. | |
typedef _LCS_HeaderCPU | LCS_HeaderCPU |
Typedef for struct _LCS_HeaderCPU. | |
typedef _LCS_Protocol | LCS_Protocol |
Typedef for union _LCS_Protocol. | |
typedef _LCS_Header | LCS_Header |
Typedef for union _LCS_Header. | |
typedef _LCS_Reply | LCS_Reply |
Typedef for struct _LCS_Reply. | |
typedef _LCS_Timeout | LCS_Timeout |
Typedef for struct _LCS_Timeout. | |
typedef _LRX_Service | LRX_Service |
Typedef for struct _LRX_Service. | |
typedef _LTX_Adapter | LTX_Adapter |
Typedef for struct _LTX_Adapter. | |
typedef _LTX_Sync | LTX_Sync |
Typedef for struct _LTX_Sync. | |
typedef _LTX_Service | LTX_Service |
Typedef for struct _LTX_Service. | |
Enumerations | |
enum | _LCS_OpCode { LCS_OPCD_NONE = 0, LCS_OPCD_SEND = 1, LCS_OPCD_ALLOC = 2 } |
Enumeration of operation codes. More... | |
enum | _LCS_ServiceState { LCS_SVC_UNKNOWN = -1, LCS_SVC_UNINITIALIZED = 0, LCS_SVC_INITIALIZED = 1, LCS_SVC_STARTED = 2, LCS_SVC_STOPPING = 3 } |
Enumeration of states an LCS service can be in. More... | |
enum | _LCS_ControlState { LCS_CTL_UNINITIALIZED = 0, LCS_CTL_INITIALIZED = 1 } |
Enumeration of LCS control states. More... | |
enum | _LRX_Counter { LRX_CNT_RQALOC = 0, LRX_CNT_PACKET = 1, LRX_CNT_SHARD = 2, LRX_CNT_FSM_READY_ERR = 3, LRX_CNT_FSM_ACTIVE_ERR = 4, LRX_CNT_ALLOCATION_ERR = 5, LRX_CNT_TRANSACTION_ERR = 6, LRX_CNT_SEQ_CNT_ERR = 7, LRX_CNT_FRG_CNT_ERR = 8, LRX_CNT_OVERRUN_ERR = 9, LRX_CNT_UNDERRUN_ERR = 10, LRX_CNT_DISPATCH_ERR = 11 } |
Enumeration of LRX statistics counters. More... | |
enum | _LTX_AdapterList { LTX_ADAPTER_CPU2 = 0, LTX_ADAPTER_CPU3 = 1, LTX_ADAPTER_SDI2 = 2 } |
Enumeration of LTX protocol adapters. More... | |
enum | _LTX_EngineState { LTX_ENG_NONE = 0, LTX_ENG_READY = 1, LTX_ENG_BUSY = 2 } |
Enumeration of states an LCS transmit engine can be in. More... | |
Functions | |
LRX_Engine * | LCS_getRxEngine (ITC_NodeID nid, ITC_QueueID qid) |
Return the LRX engine handle. | |
LTX_Engine * | LCS_getTxEngine (ITC_TaskID tid, ITC_QueueID qid) |
Return the LTX engine handle. | |
unsigned int | LCS_sizeofRxEngine (void) |
Return size of an LRX engine structure. | |
unsigned int | LCS_sizeofTxEngine (void) |
Return size of an LTX engine structure. | |
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). | |
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. | |
unsigned int | LRX_setAlloc (LRX_cb_Alloc *rtn) |
Set the allocation plug-in. | |
FORK_cb_status | LTX_allocReply (FORK_cb_prm *prm, FORK_msg_hdr *msg) |
Process a reply to an allocation request. | |
void | LTX_cancelTimer (LTX_Engine *txe) |
Cancel a synchronization timeout. | |
void | LTX_protocolCPU (LTX_Engine *txe, unsigned int siz) |
Form the protocol header for one packet of a CPU/CPU transaction. | |
void | LTX_protocolSDI (LTX_Engine *txe, unsigned int siz) |
Form the protocol header for one packet of a CPU/SDI transaction. | |
FORK_cb_status | LTX_reset (LTX_Engine *txe, unsigned int status) |
Make the engine ready for new business. | |
unsigned int | LTX_sendFirst (LTX_Engine *txe) |
LTX service task send first packet. | |
FORK_cb_status | LTX_sendNext (LTX_Engine *txe, unsigned int status) |
Field the result item resulting from an event message send. | |
FORK_cb_status | LTX_sendReply (FORK_cb_prm *prm, FORK_msg_hdr *msg) |
Process a reply to the last packet of a message. | |
FORK_cb_status | LTX_sendSync (LTX_Engine *txe) |
Last packet synchronization. | |
unsigned int | LTX_service (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len) |
LTX service task queue item callback routine. | |
unsigned int | LTX_startCPU2 (LTX_Engine *txe) |
Start a protocol 2 CPU to CPU transaction. | |
unsigned int | LTX_startCPU3 (LTX_Engine *txe) |
Start a protocol 3 CPU to CPU transaction. | |
unsigned int | LTX_startSDI2 (LTX_Engine *txe) |
Start a protocol 2 CPU to SDI transaction. | |
void | LTX_startTimer (LTX_Engine *txe, unsigned int lcsp, unsigned int mto) |
Start synchronization timeout. | |
unsigned int | LTX_submit (LTX_Engine *txe, LCBD_cl_event *cl, unsigned int siz) |
Construct an LTX packet (all kinds) and submit to the LCB. | |
unsigned int | LTX_sync (LTX_Engine *txe, ITC_NodeID nid, unsigned int key, unsigned int dat) |
LTX service response synchronization. | |
Variables | |
LCS_Control * | LCS_lcb |
Master control block for the LCS system. | |
const char * | LCS_ctl_states [LCS_L_CTL_STATES] |
String constants for LCS control block states. | |
const char * | LCS_svc_states [LCS_L_SVC_STATES] |
String constants for LCS service block states. | |
const LTX_Adapter | LTX_adapter [LTX_L_ADAPTERS] |
Instantiations of the protocol adapters. |
CVS $Id: LCS_prvdefs.h,v 1.6 2005/09/21 01:28:11 apw Exp $
|
Enumeration of LCS control states.
|
|
Enumeration of operation codes.
|
|
Enumeration of states an LCS service can be in.
|
|
|
Enumeration of LTX protocol adapters.
|
|
Enumeration of states an LCS transmit engine can be in.
|
|
Return the LRX engine handle.
|
|
Return the LTX engine handle.
|
|
Return size of an LRX engine structure.
|
|
Return size of an LTX engine structure.
|
|
Allocation plug-in (normal operation ... not testing).
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. |
|
Service LCB protocol 2 messages.
|
|
Service LCB protocol 2 messages.
|
|
Set the allocation plug-in.
|
|
Process a reply to an allocation request.
|
|
Cancel a synchronization timeout.
|
|
Form the protocol header for one packet of a CPU/CPU transaction.
|
|
Form the protocol header for one packet of a CPU/SDI transaction.
|
|
Make the engine ready for new business.
|
|
LTX service task send first packet.
|
|
Field the result item resulting from an event message send.
|
|
Process a reply to the last packet of a message.
|
|
Last packet synchronization.
|
|
LTX service task queue item callback routine.
|
|
Start a protocol 2 CPU to CPU transaction.
|
|
Start a protocol 3 CPU to CPU transaction.
|
|
Start a protocol 2 CPU to SDI transaction.
|
|
Start synchronization timeout.
|
|
Construct an LTX packet (all kinds) and submit to the LCB.
|
|
LTX service response synchronization.
|
|
Master control block for the LCS system. Master control block for the LCS system. This is global, so care must be taken when writing elements of this block that the code is properly protected. |