1 #ifndef EVENTFILTER_RESOURCEBROKER_EVFFEDFILLERRB
2 #define EVENTFILTER_RESOURCEBROKER_EVFFEDFILLERRB
6 #include "interface/shared/fed_header.h"
8 #define FED_HCTRLID_INSERT ( ( (FED_SLINK_START_MARKER) & FED_HCTRLID_WIDTH )<< FED_HCTRLID_SHIFT)
9 #define FED_EVTY_INSERT(a) ( ( (a) & FED_EVTY_WIDTH ) << FED_EVTY_SHIFT )
10 #define FED_LVL1_INSERT(a) ( ( (a) & FED_LVL1_WIDTH ) << FED_LVL1_SHIFT )
11 #define FED_BXID_INSERT(a) ( ( (a) & FED_BXID_WIDTH ) << FED_BXID_SHIFT )
12 #define FED_SOID_INSERT(a) ( ( (a) & FED_SOID_WIDTH ) << FED_SOID_SHIFT )
13 #define FED_VERSION_INSERT(a) ( ( (a) & FED_VERSION_WIDTH ) << FED_VERSION_SHIFT )
14 #define FED_MORE_HEADERS_INSERT(a) ( ( (a) & FED_MORE_HEADERS_WIDTH ) << FED_MORE_HEADERS_SHIFT )
16 #include "interface/shared/fed_trailer.h"
17 #define FED_TCTRLID_INSERT ( ( (FED_SLINK_END_MARKER) & FED_TCTRLID_WIDTH ) << FED_TCTRLID_SHIFT )
18 #define FED_EVSZ_INSERT(a) ( ( (a) & FED_EVSZ_WIDTH ) << FED_EVSZ_SHIFT )
19 #define FED_CRCS_INSERT(a) ( ( (a) & FED_CRCS_WIDTH ) << FED_CRCS_SHIFT )
20 #define FED_STAT_INSERT(a) ( ( (a) & FED_STAT_WIDTH ) << FED_STAT_SHIFT )
21 #define FED_TTSI_INSERT(a) ( ( (a) & FED_TTSI_WIDTH ) << FED_TTSI_SHIFT )
22 #define FED_MORE_TRAILERS_INSERT(a) ( ( (a) & FED_MORE_TRAILERS_WIDTH ) << FED_MORE_TRAILERS_SHIFT )
37 int retval = gethostname(hostname, 32);
41 if (strtok(hostname,
"-") == 0)
43 char *
p = strtok(0,
"-");
46 hostid = strtol(p, 0, 16) << 8;
51 hostid += strtol(p, 0, 16);
68 void putHeader(
unsigned int l1id,
unsigned int bxid) {
#define FED_TCTRLID_INSERT
unsigned int size() const
const unsigned int EVFFED_EPIDENT_OFFSET
void setRBEventCount(uint32_t evtcnt)
const unsigned int EVFFED_RBINSTA_SHIFT
unsigned char asBytes[fedinterface::EVFFED_TOTALSIZE]
#define FED_EVSZ_INSERT(a)
const unsigned int EVFFED_EPPCIDE_SHIFT
const unsigned int EVFFED_ID
unsigned int fedId() const
const unsigned int EVFFED_RBINSTA_MASK
unsigned int instanceNumber() const
const unsigned int EVFFED_RBPCIDE_SHIFT
const unsigned int SLINK_HALFWORD_SIZE
EvffedFillerRB(FUResourceBroker *rb)
void setEPProcessId(pid_t pid)
#define FED_LVL1_INSERT(a)
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
const unsigned int EVFFED_TOTALSIZE
const unsigned int FED_TRAILER_SIZE
const unsigned int EVFFED_RBPCIDE_MASK
const unsigned int EVFFED_RBEVCNT_OFFSET
#define FED_SOID_INSERT(a)
const unsigned int EVFFED_RBWCTIM_OFFSET
unsigned char *const getPayload()
unsigned long long uint64_t
const unsigned int EVFFED_LENGTH
const unsigned int EVFFED_VERSION
#define FED_VERSION_INSERT(a)
uint32_t asHWords[fedinterface::EVFFED_TOTALSIZE/sizeof(uint32_t)]
const unsigned int EVFFED_RBIDENT_OFFSET
void setRBTimeStamp(uint64_t ts)
#define FED_BXID_INSERT(a)
const unsigned int EVFFED_EPPCIDE_MASK
uint64_t asWords[fedinterface::EVFFED_TOTALSIZE/sizeof(uint64_t)]
#define FED_EVTY_INSERT(a)
#define FED_CRCS_INSERT(a)
#define FED_HCTRLID_INSERT
void putHeader(unsigned int l1id, unsigned int bxid)