stream  0.10.0
stream analysis framework
Public Member Functions | Static Public Member Functions | Protected Attributes
base::Message Class Reference

ROC Message. More...

#include <base/Message.h>

Public Member Functions

 Message ()
 constructor
 
 Message (const Message &src)
 constructor
 
void assign (const Message &src)
 assign
 
Messageoperator= (const Message &src)
 assign operator
 
void reset ()
 reset
 
uint32_t getField (uint32_t shift, uint32_t len) const
 get field
 
void setField (uint32_t shift, uint32_t len, uint32_t value)
 set field
 
uint8_t getBit (uint32_t shift) const
 get bit
 
void setBit (uint32_t shift, uint8_t value)
 set bit
 
uint8_t getMessageType () const
 Returns the message type. Valid for all message types. 4 bit.
 
uint16_t getRocNumber () const
 Returns the number of the sending ROC. More...
 
void setMessageType (uint8_t v)
 Sets the message type field in the current message.
 
void setRocNumber (uint16_t v)
 Sets the ROC number field in the current message.
 
uint32_t getEpochNumber () const
 For Epoch data: Returns current epoch number (32 bit field) inline uint32_t getEpochNumber() const { return getField(8, 32); } on some machines 32-bit field is not working.
 
uint8_t getEpochMissed () const
 For Epoch data: Returns number of missed hits (8 bit field)
 
void setEpochNumber (uint32_t v)
 For Epoch data: Sets epoch number (32 bit field)
 
void setEpochMissed (uint8_t v)
 For Epoch data: Sets missed hits count (8 bit field)
 
uint8_t getSyncChNum () const
 For Sync data: Returns sync channel number (2 bit field)
 
uint16_t getSyncTs () const
 For Sync data: Returns sync time stamp (13 bit field, 2 ns bins)
 
uint8_t getSyncEpochLSB () const
 For Sync data: Returns LSB of true epoch (1 bit field)
 
uint32_t getSyncData () const
 For Sync data: Returns sync message data (24 bit field)
 
uint8_t getSyncStFlag () const
 For Sync data: Returns sync status flags (2 bit field)
 
void setSyncChNum (uint8_t v)
 For Sync data: Set sync channel number (2 bit field)
 
void setSyncTs (uint16_t v)
 For Sync data: Set sync time stamp (13 bit field, 2 ns bins )
 
void setSyncEpochLSB (uint8_t v)
 For Sync data: Set LSB of true epoch (1 bit field)
 
void setSyncData (uint32_t v)
 For Sync data: Set sync message data (24 bit field)
 
void setSyncStFlag (uint8_t v)
 For Sync data: Set sync status flags (2 bit field)
 
uint8_t getAuxChNum () const
 For Aux data: Returns aux channel number (7 bit field)
 
uint16_t getAuxTs () const
 For Aux data: Returns aux time stamp (13 bit field, 2 ns bins)
 
uint8_t getAuxEpochLSB () const
 For Aux data: Returns LSB of true epoch (1 bit field)
 
uint8_t getAuxFalling () const
 For Aux data: Returns falling edge flag (1 bit flag)
 
uint8_t getAuxOverflow () const
 For Aux data: Returns overflow flag (1 bit field)
 
void setAuxChNum (uint8_t v)
 For Aux data: Set aux channel number (7 bit field)
 
void setAuxTs (uint16_t v)
 For Aux data: Set aux time stamp (13 bit field)
 
void setAuxEpochLSB (uint8_t v)
 For Aux data: Set LSB of true epoch (1 bit field)
 
void setAuxFalling (uint8_t v)
 For Aux data: Set falling edge flag (1 bit flag)
 
void setAuxOverflow (uint8_t v)
 For Aux data: Set overflow flag (1 bit field)
 
uint8_t getSysMesType () const
 For SysMes data: Returns system message subtype (8 bit field)
 
uint32_t getSysMesData () const
 For SysMes data: Returns system message data (32 bit field)
 
void setSysMesType (uint8_t v)
 For SysMes data: Set system message type (8 bit field)
 
void setSysMesData (uint32_t v)
 For SysMes data: Set system message data (32 bit field)
 
bool isNopMsg () const
 Returns true is message type is #MSG_NOP (filler message)
 
bool isEpochMsg () const
 Returns true is message type is #MSG_EPOCH (epoch marker)
 
bool isSyncMsg () const
 Returns true is message type is #MSG_SYNC.
 
bool isAuxMsg () const
 Returns true is message type is #MSG_AUX.
 
bool isSysMsg () const
 Returns true is message type is #MSG_SYS (system message)
 
bool isStartDaqMsg () const
 Returns true if system message and subtype #ROC_SYSMSG_DAQ_START.
 
bool isStopDaqMsg () const
 Returns true if system message and subtype #ROC_SYSMSG_DAQ_FINISH.
 

Static Public Member Functions

static uint32_t RawSize (int fmt)
 returns raw size
 

Protected Attributes

uint64_t data
 main and only storage field for the message
 

Detailed Description

ROC Message.

Member Function Documentation

◆ getRocNumber()

uint16_t base::Message::getRocNumber ( ) const
inline

Returns the number of the sending ROC.

Valid for all message types.

The field has full 16 bits and allows to aggregate data of up to 64K ROC's in one message stream.


The documentation for this class was generated from the following files: