GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-12-1 > esu / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

EDS_fw.h File Reference

Event Delivery Services, framework, interface. More...

#include <EDS/LCBV.h>
#include <EDS/EBF_siv.h>
#include <EDS/EDS_rsd.h>
#include <EDS/EDS_fwServices.h>

Classes

struct  _EDS_fwIxbInfo
 Derived information about the event that is can be shared between processor. More...
struct  _EDS_fwEvt
 These are the reserved data blocks used in the EDS_fwIxb. More...
union  _EDS_fwIxbBlk
 The pointer data block. More...
struct  _EDS_fwIxbSrc
 Static information about the nature of the data source controlled by this EDS framework. More...
struct  _EDS_fwIxbDst
 Static information about the nature of the data sinking controlled by this EDS framework. More...
struct  _EDS_fwIxb
 Encapsulates all the derived data structures associated with an event. More...

Defines

#define EDS_FW_MASK(_bitNumber)   (1 << (31 - (_bitNumber)))
 Creates the corresponding bit mask.

Typedefs

typedef enum _EDS_FW_OBJ_K EDS_FW_OBJ_K
 Typedef for enum _EDS_OBJ_K.
typedef enum _EDS_FW_OBJ_V EDS_FW_OBJ_V
 Typedef for enum _EDS_OBJ_V.
typedef enum _EDS_FW_OBJ_M EDS_FW_OBJ_M
 Typedef for enum _EDS_OBJ_M.
typedef enum _EDS_FW_K_POST EDS_FW_K_POST
 Typedef for enum _EDS_FW_K_POST.
typedef enum _EDS_FW_V_POST EDS_FW_V_POST
 Typedef for enum _EDS_FW_V_POST.
typedef enum _EDS_FW_M_POST EDS_FW_M_POST
 Typedef for enum _EDS_FW_M_POST.
typedef enum _EDS_FW_FN_V EDS_FW_FN_V
 Typedef for enum _EDS_FW_FN_V.
typedef enum _EDS_FW_FN_M EDS_FW_FN_M
 Typedef for enum _EDS_FW_FN_M.
typedef void *(* EDS_fwMemNew )(void *prm, unsigned int amount)
 Callback signature for the framework's allocator.
typedef void(* EDS_fwMemDelete )(void *prm, void *ptr, unsigned int amount)
 Callback signature for the memory deallocator.
typedef enum _EDS_FW_EVTQUE_K EDS_FW_EVTQUE_K
 Typedef for enum _EDS_FW_EVTQUE_K.
typedef struct _EDS_fwIxbInfo EDS_fwIxbInfo
 Typedef for EDS_fwIxbInfo.
typedef struct _EDS_fwEvt EDS_fwEvt
 Typedef for struct _EDS_fwEvt.
typedef union _EDS_fwIxbBlk EDS_fwIxbBlk
 Typedef for union _EDS_fwIxbBlk.
typedef unsigned int(* EDS_fwIxbObjConstructor )(void *ptr)
 Signature for constructing an Information Exchange objects.
typedef unsigned int(* EDS_fwIxbObjDestructor )(void *ptr)
 Signature 'for destructing' an Information Exchange objects.
typedef void(* EDS_fwIxbObjReset )(void *ptr)
 Signature for resetting an Information Exchange object.
typedef struct _EDS_fwIxbSrc EDS_fwIxbSrc
 Typedef for struct _EDS_fwIxbSrc.
typedef struct _EDS_fwIxbDst EDS_fwIxbDst
 Typedef for struct _EDS_fwIxbDst.
typedef struct _EDS_fwIxb EDS_fwIxb
 Typedef for struct _EDS_fwIxb.

Enumerations

enum  _EDS_FW_OBJ_K {
  EDS_FW_OBJ_K_ERR = 0,
  EDS_FW_OBJ_K_DIR = 1,
  EDS_FW_OBJ_K_ACD = 2,
  EDS_FW_OBJ_K_TKR = 3,
  EDS_FW_OBJ_K_CAL = 4,
  EDS_FW_OBJ_K_ACDC = 5,
  EDS_FW_OBJ_K_TKRC = 6,
  EDS_FW_OBJ_K_CALC = 7,
  EDS_FW_OBJ_K_CNT = 8
}
 Enumerates what the type of objects the framework manages. More...
enum  _EDS_FW_OBJ_V {
  EDS_FW_OBJ_V_ERR = 31 - EDS_FW_OBJ_K_ERR,
  EDS_FW_OBJ_V_DIR = 31 - EDS_FW_OBJ_K_DIR,
  EDS_FW_OBJ_V_ACD = 31 - EDS_FW_OBJ_K_ACD,
  EDS_FW_OBJ_V_TKR = 31 - EDS_FW_OBJ_K_TKR,
  EDS_FW_OBJ_V_CAL = 31 - EDS_FW_OBJ_K_CAL,
  EDS_FW_OBJ_V_ACDC = 31 - EDS_FW_OBJ_K_ACDC,
  EDS_FW_OBJ_V_TKRC = 31 - EDS_FW_OBJ_K_TKRC,
  EDS_FW_OBJ_V_CALC = 31 - EDS_FW_OBJ_K_CALC
}
 Enumerates the bit positions of the print objects. More...
enum  _EDS_FW_OBJ_M {
  EDS_FW_OBJ_M_ERR = (1 << EDS_FW_OBJ_V_ERR ),
  EDS_FW_OBJ_M_DIR = (1 << EDS_FW_OBJ_V_DIR ),
  EDS_FW_OBJ_M_ACD = (1 << EDS_FW_OBJ_V_ACD ),
  EDS_FW_OBJ_M_TKR = (1 << EDS_FW_OBJ_V_TKR ),
  EDS_FW_OBJ_M_CAL = (1 << EDS_FW_OBJ_V_CAL ),
  EDS_FW_OBJ_M_ACDC = (1 << EDS_FW_OBJ_V_ACDC ),
  EDS_FW_OBJ_M_TKRC = (1 << EDS_FW_OBJ_V_TKRC ),
  EDS_FW_OBJ_M_CALC = (1 << EDS_FW_OBJ_V_CALC ),
  EDS_FW_OBJ_M_ALL
}
 Enumerates the bit masks of the print objects. More...
enum  _EDS_FW_K_POST {
  EDS_FW_K_POST_0 = 0,
  EDS_FW_K_POST_1 = 1,
  EDS_FW_K_POST_2 = 2,
  EDS_FW_K_POST_3 = 3,
  EDS_FW_K_POST_CNT = 4
}
 Enumeration of the output posting queues/streams. More...
enum  _EDS_FW_V_POST {
  EDS_FW_V_POST_0 = 31 - EDS_FW_K_POST_0,
  EDS_FW_V_POST_1 = 31 - EDS_FW_K_POST_1,
  EDS_FW_V_POST_2 = 31 - EDS_FW_K_POST_2,
  EDS_FW_V_POST_3 = 31 - EDS_FW_K_POST_3
}
 Enumeration of the output posting queues/streams, right justified bit offset. More...
enum  _EDS_FW_M_POST {
  EDS_FW_M_POST_0 = 1 << EDS_FW_V_POST_0,
  EDS_FW_M_POST_1 = 1 << EDS_FW_V_POST_1,
  EDS_FW_M_POST_2 = 1 << EDS_FW_V_POST_2,
  EDS_FW_M_POST_3 = 1 << EDS_FW_V_POST_3
}
 Enumeration of the output posting queues/streams, in place masks. More...
enum  _EDS_FW_FN_V {
  EDS_FW_FN_V_NO_MORE = 0,
  EDS_FW_FN_V_DIR = 1,
  EDS_FW_FN_V_RSVD_2 = 2,
  EDS_FW_FN_V_RSVD_3 = 3,
  EDS_FW_FN_V_FIRST = 4,
  EDS_FW_FN_V_MID = 5,
  EDS_FW_FN_V_LAST = 6,
  EDS_FW_FN_V_STOP = 7,
  EDS_FW_FN_V_POST = 12,
  EDS_FW_FN_V_POST_3 = 12,
  EDS_FW_FN_V_POST_2 = 13,
  EDS_FW_FN_V_POST_1 = 14,
  EDS_FW_FN_V_POST_0 = 15
}
 The bit offsets of fate and need bits. More...
enum  _EDS_FW_FN_M {
  EDS_FW_FN_M_NO_MORE = (1 << EDS_FW_FN_V_NO_MORE),
  EDS_FW_FN_M_DIR = (1 << EDS_FW_FN_V_DIR),
  EDS_FW_FN_M_RSVD_2 = (1 << EDS_FW_FN_V_RSVD_2),
  EDS_FW_FN_M_RSVD_3 = (1 << EDS_FW_FN_V_RSVD_3),
  EDS_FW_FN_M_FIRST = (1 << EDS_FW_FN_V_FIRST),
  EDS_FW_FN_M_MID = (1 << EDS_FW_FN_V_MID),
  EDS_FW_FN_M_LAST = (1 << EDS_FW_FN_V_LAST),
  EDS_FW_FN_M_STOP = (1 << EDS_FW_FN_V_STOP),
  EDS_FW_FN_M_POST,
  EDS_FW_FN_M_POST_3 = (1 << EDS_FW_FN_V_POST_3),
  EDS_FW_FN_M_POST_2 = (1 << EDS_FW_FN_V_POST_2),
  EDS_FW_FN_M_POST_1 = (1 << EDS_FW_FN_V_POST_1),
  EDS_FW_FN_M_POST_0 = (1 << EDS_FW_FN_V_POST_0)
}
 The bit masks of fate and need bits.
enum  _EDS_FW_EVTQUE_K { EDS_FW_EVTQUE_K_EVT = 31 }
 Enumerates the names of the event queues. More...

Functions

int EDS_fwSizeof (void)
void EDS_fwConstruct (EDS_fw *fw, EDS_fwMemNew memNew, EDS_fwMemDelete memDelete, void *memPrm)
void EDS_fwConstruct1 (EDS_fw *fw, EDS_fwMemNew memNew, EDS_fwMemDelete memDelete, void *memPrm, unsigned int origin, unsigned int cpu, unsigned int apidOffset)
int EDS_fwPostRegister (EDS_fw *fw, unsigned int idx, EDS_fwPostStartRtn start, EDS_fwPostWriteRtn write, EDS_fwPostNotifyRtn notify, EDS_fwPostFlushRtn flush, void *prm)
int EDS_fwPostServicesRegister (EDS_fw *fw, unsigned int idx, const EDS_fwPostServices *services, void *prm)
void EDS_fwFreeSet (EDS_fw *fw, LCBV_pktsRngFreeCb pktsFreeRtn, void *pktsFreePrm)
int EDS_fwIxbObjAdd (EDS_fw *fw, int object, int size, EDS_fwIxbObjConstructor construct, EDS_fwIxbObjDestructor destruct, EDS_fwIxbObjReset reset)
unsigned int EDS_fwIxbObjAllocate (EDS_fw *fw, unsigned int objects)
unsigned int EDS_fwDestruct (EDS_fw *fw)
int EDS_fwHandlerRegisterX1 (EDS_fw *fw, int priority, unsigned int objects, unsigned int needs, unsigned int result_size, EDS_fwHandlerProcessRtn process, EDS_fwHandlerAssociateRtn associate, EDS_fwHandlerStartRtn start, EDS_fwHandlerSelectRtn select, EDS_fwHandlerFlushRtn flush, EDS_fwHandlerDestructRtn destruct, void *prm)
int EDS_fwHandlerServicesRegisterX1 (EDS_fw *fw, int priority, const EDS_fwHandlerServicesX1 *services, void *prm)
int EDS_fwHandlerRegister (EDS_fw *fw, int priority, unsigned int objects, unsigned int needs, unsigned int result_size, EDS_fwHandlerProcessRtn process, EDS_fwHandlerAssociateRtn associate, EDS_fwHandlerSelectRtn select, EDS_fwHandlerFlushRtn flush, EDS_fwHandlerDestructRtn destruct, void *prm)
int EDS_fwHandlerServicesRegister (EDS_fw *fw, int priority, const EDS_fwHandlerServices *services, void *prm)
int EDS_fwHandlerUnregister (EDS_fw *fw, int priority)
unsigned int EDS_fwHandlerChange (EDS_fw *fw, unsigned int targets, unsigned int newState)
int EDS_fwHandlerProcess (EDS_fw *fw, unsigned int edw, EBF_pkt *pkt)
unsigned int EDS_fwHandlerStart (EDS_fw *fw, unsigned int list, int reason, unsigned int run_id, unsigned int startTime, unsigned int mode)
unsigned int EDS_fwHandlerSelect (EDS_fw *fw, unsigned int targets, unsigned int mode)
unsigned int EDS_fwHandlerAssociate (EDS_fw *fw, unsigned int targets, unsigned int mode, unsigned int configuration)
unsigned int EDS_fwHandlerFlush (EDS_fw *fw, unsigned int targets, int reason)
unsigned int EDS_fwPostChange (EDS_fw *fw, unsigned int list, unsigned int newState)
unsigned int EDS_fwPostStart (EDS_fw *fw, unsigned int list, int reason, unsigned int run_id, unsigned int startTime, unsigned int mode, unsigned int hw_key, unsigned int cfg_key)
unsigned int EDS_fwPostResume (EDS_fw *fw, unsigned int list, int reason)
unsigned int EDS_fwPostFlush (EDS_fw *fw, unsigned int list, int reason)
unsigned int EDS_fwPostNotify (EDS_fw *fw, unsigned int list, unsigned int mode)
int EDS_fwEvtQueSet (EDS_fw *fw, unsigned int que_id, FORK_que *que)
FORK_que * EDS_fwEvtQueGet (EDS_fw *fw, unsigned int que_id)
EDS_fwIxbEDS_fwIxbLocate (EDS_fw *fw)


Detailed Description

Event Delivery Services, framework, interface.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: EDS_fw.h,v 1.12 2011/03/25 22:16:55 russell Exp $


Define Documentation

#define EDS_FW_MASK ( _bitNumber   )     (1 << (31 - (_bitNumber)))

Creates the corresponding bit mask.

Returns:
The bit mask corresponding to the specified _bitNumber
Parameters:
_bitNumber The bit number
All bit masks in the EDS framework are stored big endian style; that is the most significant bit is labelled as bit 0. This macro should be used to avoid the confusion and errors when creating bit masks from bit numbers.


Typedef Documentation

Typedef for enum _EDS_FW_FN_M.

This enumeration should be used when returning a value from a handler

Typedef for enum _EDS_FW_FN_V.

This enumeration should be used when returning a value from a handler

Typedef for enum _EDS_FW_K_POST.

This enumeration should be used when specifying the index to EDS_fwPostRegister.

Typedef for enum _EDS_FW_M_POST.

This enumeration should be used when specifing the target list mask to EDS_fwStreamFlush.

Typedef for enum _EDS_OBJ_M.

Typedef for enum _EDS_FW_OBJ_M.

Typedef for enum _EDS_OBJ_V.

Typedef for enum _EDS_FW_OBJ_V.

Typedef for enum _EDS_FW_V_POST.

This enumeration should be used when referring to the bits in the target list to EDS_fwStreamFlush.

Typedef for struct _EDS_fwIxb.

This structure consists of some management variables and a list of 32 generic pointers. These pointers can be used by various processors to reference data that needs to be shared amongst processors. Typically one processor would write the data structure and other processors would reference it. This information may be filled in
  1. packet-by-packet
  2. event-by-event
  3. statically seeded at initialization time

The implementation says nothing about how these pointers are to be used, although the first 8 or so have been spoken for. These are used to hold the unpacked event and calibration constants. The only compact is between the writer and the readers.

Typedef for EDS_fwIxbInfo.

This is convenience information computed by the framework's event processing routine. It is deemed commonly useful and cheap enough that it is provided for every event.
There are two sequence numbers in this structure
  1. The ESW extended sequence number
  2. The EDS sequence number.

The latter is just the count of the number of events seen by the EDS_fwProcess routine. The GEM extended sequence number is derived from the 17-bit sequence number in the Event Summary Word. Since this number is only 17 bits, it will rollover every 2**17 events. When EDS detects this rollover (by virtue of the fact that the current value is less than the current value), it adds 1 << 18. This is reasonably safe, but can get fouled up if more than 2**17 events pass between successive events.
Note that while the sequence number is dense, the extended sequence number may not be. That is because events may be being dispatched round-robin style amongst the event processsing CPUs.

unsigned int(* EDS_fwIxbObjConstructor)(void *ptr)

Signature for constructing an Information Exchange objects.

Returns:
Status
Parameters:
ptr A pointer to the object to construct

unsigned int(* EDS_fwIxbObjDestructor)(void *ptr)

Signature 'for destructing' an Information Exchange objects.

Returns:
Status
Parameters:
ptr A pointer to the object to destruct

void(* EDS_fwIxbObjReset)(void *ptr)

Signature for resetting an Information Exchange object.

Returns:
Status
Parameters:
ptr A pointer to the object to reset

void(* EDS_fwMemDelete)(void *prm, void *ptr, unsigned int amount)

Callback signature for the memory deallocator.

Parameters:
prm Arbitrary user parameter
ptr Pointer to the memory to be deallocated
amount The number of bytes to be deallocated

typedef void *(* EDS_fwMemNew)(void *prm, unsigned int amount)

Callback signature for the framework's allocator.

Returns:
Pointer to the allocated memory
Parameters:
prm Arbitrary user parameter
amount The number of bytes being requested


Enumeration Type Documentation

Enumerates the names of the event queues.

Enumerator:
EDS_FW_EVTQUE_K_EVT  Que that events are delivered on

The bit offsets of fate and need bits.

Enumerator:
EDS_FW_FN_V_NO_MORE  Don't send the processor any more packets on this event (dynamic only)
EDS_FW_FN_V_DIR  Processor needs a directory composed
EDS_FW_FN_V_RSVD_2  Reserved
EDS_FW_FN_V_RSVD_3  Reserved
EDS_FW_FN_V_FIRST  Processor wants to see the first packet in a sequence
EDS_FW_FN_V_MID  Processor wants to see the middle packets in a sequence
EDS_FW_FN_V_LAST  Processor wants to see the last packet in a sequence
EDS_FW_FN_V_STOP  Stop sending events (dynamic only)
EDS_FW_FN_V_POST  Output processors
EDS_FW_FN_V_POST_3  Post event to stream 3
EDS_FW_FN_V_POST_2  Post event to stream 2
EDS_FW_FN_V_POST_1  Post event to stream 1
EDS_FW_FN_V_POST_0  Post event to stream 0

Enumeration of the output posting queues/streams.

Enumerator:
EDS_FW_K_POST_0  Posting que/stream 0
EDS_FW_K_POST_1  Posting que/stream 1
EDS_FW_K_POST_2  Posting que/stream 2
EDS_FW_K_POST_3  Posting que/stream 3
EDS_FW_K_POST_CNT  Count of posting ques/streams

Enumeration of the output posting queues/streams, in place masks.

Enumerator:
EDS_FW_M_POST_0  Posting que/stream 0
EDS_FW_M_POST_1  Posting que/stream 1
EDS_FW_M_POST_2  Posting que/stream 2
EDS_FW_M_POST_3  Posting que/stream 3

Enumerates what the type of objects the framework manages.

Enumerator:
EDS_FW_OBJ_K_ERR  ID for the ERR contribution
EDS_FW_OBJ_K_DIR  ID for the Directory
EDS_FW_OBJ_K_ACD  ID for the ACD
EDS_FW_OBJ_K_TKR  ID for the TKR
EDS_FW_OBJ_K_CAL  ID for the CAL
EDS_FW_OBJ_K_ACDC  ID for the ACD calibration constants
EDS_FW_OBJ_K_TKRC  ID for the TKR calibration constants
EDS_FW_OBJ_K_CALC  ID for the CAL calibration constants
EDS_FW_OBJ_K_CNT  Count of the number EDS fw objects

Enumerates the bit masks of the print objects.

Bit masks for the managed objects.

Enumerator:
EDS_FW_OBJ_M_ERR  Mask for the ERR contribution
EDS_FW_OBJ_M_DIR  Mask for the directory
EDS_FW_OBJ_M_ACD  Mask for the ACD
EDS_FW_OBJ_M_TKR  Mask for the TKR
EDS_FW_OBJ_M_CAL  Mask for the CAL
EDS_FW_OBJ_M_ACDC  Mask for the ACD calibration constants
EDS_FW_OBJ_M_TKRC  Mask for the TKR calibration constants
EDS_FW_OBJ_M_CALC  Mask for the CAL calibration constants
EDS_FW_OBJ_M_ALL  Mask of all EDS framework objects

Enumerates the bit positions of the print objects.

Bit offsets for the managed objects.

Enumerator:
EDS_FW_OBJ_V_ERR  Bit offset for the ERR contribution
EDS_FW_OBJ_V_DIR  Bit offset for the DIR
EDS_FW_OBJ_V_ACD  Bit offset for the GEM
EDS_FW_OBJ_V_TKR  Bit offset for the TKR
EDS_FW_OBJ_V_CAL  Bit offset for the CAL
EDS_FW_OBJ_V_ACDC  Bit offset for the ACD calibration constants
EDS_FW_OBJ_V_TKRC  Bit offset for the TKR calibration constants
EDS_FW_OBJ_V_CALC  Bit offset for the CAL calibration constants

Enumeration of the output posting queues/streams, right justified bit offset.

Enumerator:
EDS_FW_V_POST_0  Posting que/stream 0
EDS_FW_V_POST_1  Posting que/stream 1
EDS_FW_V_POST_2  Posting que/stream 2
EDS_FW_V_POST_3  Posting que/stream 3


Generated on Wed Nov 21 18:40:55 2012 by  doxygen 1.5.8