CbmRoot
Loading...
Searching...
No Matches
stsxyter::Message Class Reference

#include <StsXyterMessage.h>

Public Member Functions

XPU_D Message ()
 
XPU_D Message (const Message &src)
 
XPU_D Message (uint32_t uDataIn)
 
XPU_D ~Message ()
 
XPU_D void assign (const Message &src)
 
XPU_D Messageoperator= (const Message &src)
 
XPU_D void reset ()
 
XPU_D uint32_t GetData () const
 
XPU_D void SetData (uint32_t uValue)
 
XPU_D uint32_t GetField (uint32_t uShift, uint32_t uLen) const
 
XPU_D uint8_t GetBit (uint32_t uShift) const
 
XPU_D uint32_t GetFieldBE (uint32_t uShift, uint32_t uLen) const
 
XPU_D uint8_t GetBitBE (uint32_t uShift) const
 
XPU_D uint32_t DataBE () const
 
XPU_D void SetField (uint32_t uShift, uint32_t uLen, uint32_t uValue)
 
XPU_D void SetBit (uint32_t uShift, uint8_t uValue)
 
XPU_D uint32_t GetField (MessField field) const
 
XPU_D uint8_t GetBit (MessField field) const
 
XPU_D bool GetFlag (MessField field) const
 
XPU_D uint32_t GetFieldBE (MessField field) const
 
XPU_D uint8_t GetBitBE (MessField field) const
 
XPU_D void SetField (MessField field, uint32_t uValue)
 
XPU_D void SetBit (MessField field, uint8_t ucValue)
 
XPU_D uint16_t GetLinkIndex () const
 For all data: Returns the (global) index of the eLink on which the message was received (n bit field)
 
XPU_D bool IsHit () const
 Check if the message if a Hit Message.
 
XPU_D bool IsDummy () const
 Check if the message if a Dummy Hit Message.
 
XPU_D bool IsTsMsb () const
 Check if the message if a Ts_Msb.
 
XPU_D MessType GetMessType () const
 Returns the message type, see enum MessType.
 
XPU_D uint16_t GetHitChannel () const
 For Hit data: Returns StsXYTER channel number (7 bit field)
 
XPU_D uint16_t GetHitAdc () const
 For Hit data: Returns ADC value (5 bit field)
 
XPU_D uint16_t GetHitTimeFull () const
 For Hit data: Returns Full timestamp (10 bit field including 2 bits overlap)
 
XPU_D uint16_t GetHitTimeOver () const
 For Hit data: Returns timestamp overlap bits (2 bits field, overlap with 2 LSBs of TS_MSB message)
 
XPU_D uint16_t GetHitTime () const
 For Hit data: Returns timestamp (8 bit field, 2 MSB bits overlap removed)
 
XPU_D uint16_t GetHitTimeBinning () const
 
XPU_D uint16_t GetLinkIndexHitBinning () const
 
XPU_D bool IsHitMissedEvts () const
 For Hit data: Returns Missed event flag (1 bit field)
 
XPU_D void SetHitChannel (uint16_t usVal)
 For Hit data: Sets StsXYTER channel number (7 bit field)
 
XPU_D void SetHitAdc (uint16_t usVal)
 For Hit data: Sets ADC value (5 bit field)
 
XPU_D void SetHitTimeFull (uint16_t usVal)
 For Hit data: Sets Full timestamp (10 bit field including 2 bits overlap)
 
XPU_D void SetHitTimeOver (uint16_t usVal)
 For Hit data: Sets timestamp overlap bits (2 bits field, overlap with 2 LSBs of TS_MSB message)
 
XPU_D void SetHitTime (uint16_t usVal)
 For Hit data: Sets Full timestamp (8 bit field, 2 MSB bits overlap removed)
 
XPU_D void SetHitMissEvtsFlag (bool bVal)
 For Hit data: Sets Missed event flag (1 bit field)
 
XPU_D MessSubType GetSubType () const
 For non-Hit data: Returns subtype (2 bit field)
 
XPU_D uint32_t GetTsMsbVal () const
 For TS MSB data: Returns the TS MSB 22 bit field)
 
XPU_D uint32_t GetTsMsbValBinning () const
 For TS MSB data: Returns the TS MSB 29 bit field)
 
XPU_D void SetTsMsbVal (uint32_t uVal)
 For TS MSB data: Sets the TS MSB (22 bit field)
 
XPU_D uint32_t GetEpochVal () const
 For Epoch data: Returns the Epoch (29 bit field)
 
XPU_D void SetEpochVal (uint32_t uVal)
 For Epoch data: Sets the Epoch (29 bit field)
 
XPU_D uint16_t GetStatusLink () const
 For Status data: Returns the Link Inedx (9 bit field)
 
XPU_D uint16_t GetStatusSxTs () const
 For Status data: Returns the SMX TS from ACK frame (6 bit field)
 
XPU_D uint16_t GetStatusStatus () const
 For Status data: Returns the Status field from ACK frame (4 bit field)
 
XPU_D uint16_t GetStatusDpbTs () const
 For Status data: Returns the DPB TS when frame received (9 bit field)
 
XPU_D bool IsCpFlagOn () const
 For Status data: Returns the CP flag from ACK frame (1 bit field)
 
XPU_D void SetStatusLink (uint16_t usVal)
 For Status data: Sets the Status (9 bit field)
 
XPU_D void SetStatusSxTs (uint16_t usVal)
 For Status data: Sets the Status (6 bit field)
 
XPU_D void SetStatusStatus (uint16_t usVal)
 For Status data: Sets the Status (4 bit field)
 
XPU_D void SetStatusDpbTs (uint16_t usVal)
 For Status data: Sets the Status (9 bit field)
 
XPU_D void SetCpFlag (bool bVal)
 For Status data: Sets the Status (1 bit field)
 
XPU_D bool IsEmptyMsg () const
 For Empty/End of MS data: Check if this is an empty message (1 bit field)
 
XPU_D bool IsMsErrorFlagOn () const
 For End of MS data: Returns the MS error flag (1 bit field)
 
XPU_D uint16_t GetMsErrorType () const
 For End of MS data: Returns the MS error type field (2 bit field)
 
XPU_D void SetEmptyMsgFlag (bool bVal)
 For Empty/End of MS data data: Sets the Empty message flag (1 bit field)
 
XPU_D void SetMsErrorFlag (bool bVal)
 For End of MS data data: Sets the MS Error flag (1 bit field)
 
XPU_D void SetMsErrorType (uint16_t usVal)
 For End of MS data: Sets the MS error type field (2 bit field)
 
bool PrintMess (std::ostream &os, MessagePrintMask ctrl=MessagePrintMask::msg_print_Human, bool bBinning=true) const
 

Static Public Member Functions

static std::string PrintMessType (MessType type)
 

Protected Attributes

uint32_t fuData
 

Detailed Description

Definition at line 171 of file StsXyterMessage.h.

Constructor & Destructor Documentation

◆ Message() [1/3]

XPU_D stsxyter::Message::Message ( )
inline

Definition at line 177 of file StsXyterMessage.h.

◆ Message() [2/3]

XPU_D stsxyter::Message::Message ( const Message & src)
inline

Definition at line 179 of file StsXyterMessage.h.

◆ Message() [3/3]

XPU_D stsxyter::Message::Message ( uint32_t uDataIn)
inline

Definition at line 181 of file StsXyterMessage.h.

◆ ~Message()

XPU_D stsxyter::Message::~Message ( )
inline

Definition at line 183 of file StsXyterMessage.h.

Member Function Documentation

◆ assign()

XPU_D void stsxyter::Message::assign ( const Message & src)
inline

Definition at line 185 of file StsXyterMessage.h.

References fuData.

Referenced by operator=().

◆ DataBE()

XPU_D uint32_t stsxyter::Message::DataBE ( ) const
inline

Definition at line 211 of file StsXyterMessage.h.

References fuData.

Referenced by GetBitBE(), and GetFieldBE().

◆ GetBit() [1/2]

XPU_D uint8_t stsxyter::Message::GetBit ( MessField field) const
inline

Definition at line 232 of file StsXyterMessage.h.

References stsxyter::MessField::fusPos, and GetBit().

Referenced by GetBit().

◆ GetBit() [2/2]

XPU_D uint8_t stsxyter::Message::GetBit ( uint32_t uShift) const
inline

Definition at line 204 of file StsXyterMessage.h.

References fuData.

Referenced by GetFlag(), and GetHitTimeBinning().

◆ GetBitBE() [1/2]

XPU_D uint8_t stsxyter::Message::GetBitBE ( MessField field) const
inline

Definition at line 235 of file StsXyterMessage.h.

References stsxyter::MessField::fusPos, and GetBitBE().

Referenced by GetBitBE().

◆ GetBitBE() [2/2]

XPU_D uint8_t stsxyter::Message::GetBitBE ( uint32_t uShift) const
inline

Definition at line 210 of file StsXyterMessage.h.

References DataBE().

◆ GetData()

◆ GetEpochVal()

XPU_D uint32_t stsxyter::Message::GetEpochVal ( ) const
inline

For Epoch data: Returns the Epoch (29 bit field)

Definition at line 335 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldEpochVal().

Referenced by PrintMess().

◆ GetField() [1/2]

XPU_D uint32_t stsxyter::Message::GetField ( MessField field) const
inline

Definition at line 231 of file StsXyterMessage.h.

References stsxyter::MessField::fusLen, stsxyter::MessField::fusPos, and GetField().

Referenced by GetField().

◆ GetField() [2/2]

◆ GetFieldBE() [1/2]

XPU_D uint32_t stsxyter::Message::GetFieldBE ( MessField field) const
inline

Definition at line 234 of file StsXyterMessage.h.

References stsxyter::MessField::fusLen, stsxyter::MessField::fusPos, and GetFieldBE().

Referenced by GetFieldBE().

◆ GetFieldBE() [2/2]

XPU_D uint32_t stsxyter::Message::GetFieldBE ( uint32_t uShift,
uint32_t uLen ) const
inline

Definition at line 206 of file StsXyterMessage.h.

References DataBE().

◆ GetFlag()

XPU_D bool stsxyter::Message::GetFlag ( MessField field) const
inline

Definition at line 233 of file StsXyterMessage.h.

References stsxyter::MessField::fusPos, and GetBit().

Referenced by GetMessType(), IsHit(), and IsHitMissedEvts().

◆ GetHitAdc()

◆ GetHitChannel()

◆ GetHitTime()

◆ GetHitTimeBinning()

XPU_D uint16_t stsxyter::Message::GetHitTimeBinning ( ) const
inline

◆ GetHitTimeFull()

XPU_D uint16_t stsxyter::Message::GetHitTimeFull ( ) const
inline

For Hit data: Returns Full timestamp (10 bit field including 2 bits overlap)

Definition at line 270 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldHitTsFull().

Referenced by PrintMess(), and CbmStsUnpackAlgoLegacy::ProcessHitInfo().

◆ GetHitTimeOver()

XPU_D uint16_t stsxyter::Message::GetHitTimeOver ( ) const
inline

For Hit data: Returns timestamp overlap bits (2 bits field, overlap with 2 LSBs of TS_MSB message)

Definition at line 273 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldHitTsOver().

Referenced by CbmCosy2018MonitorPulser::FillHitInfo(), and PrintMess().

◆ GetLinkIndex()

◆ GetLinkIndexHitBinning()

◆ GetMessType()

◆ GetMsErrorType()

XPU_D uint16_t stsxyter::Message::GetMsErrorType ( ) const
inline

◆ GetStatusDpbTs()

XPU_D uint16_t stsxyter::Message::GetStatusDpbTs ( ) const
inline

For Status data: Returns the DPB TS when frame received (9 bit field)

Definition at line 351 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldStatDpbTs().

Referenced by PrintMess().

◆ GetStatusLink()

◆ GetStatusStatus()

◆ GetStatusSxTs()

XPU_D uint16_t stsxyter::Message::GetStatusSxTs ( ) const
inline

For Status data: Returns the SMX TS from ACK frame (6 bit field)

Definition at line 345 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldStatSxTs().

Referenced by PrintMess().

◆ GetSubType()

XPU_D MessSubType stsxyter::Message::GetSubType ( ) const
inline

For non-Hit data: Returns subtype (2 bit field)

Definition at line 313 of file StsXyterMessage.h.

References stsxyter::Empty, stsxyter::Epoch, GetField(), stsxyter::kFieldSubtype(), stsxyter::Status, and stsxyter::TsMsb.

Referenced by GetMessType(), and IsTsMsb().

◆ GetTsMsbVal()

◆ GetTsMsbValBinning()

◆ IsCpFlagOn()

XPU_D bool stsxyter::Message::IsCpFlagOn ( ) const
inline

For Status data: Returns the CP flag from ACK frame (1 bit field)

Definition at line 354 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldStatCpFlag().

Referenced by PrintMess().

◆ IsDummy()

XPU_D bool stsxyter::Message::IsDummy ( ) const
inline

Check if the message if a Dummy Hit Message.

Definition at line 246 of file StsXyterMessage.h.

References GetHitAdc(), and IsHit().

◆ IsEmptyMsg()

XPU_D bool stsxyter::Message::IsEmptyMsg ( ) const
inline

For Empty/End of MS data: Check if this is an empty message (1 bit field)

Definition at line 373 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldEmptyFlag().

Referenced by GetMessType().

◆ IsHit()

XPU_D bool stsxyter::Message::IsHit ( ) const
inline

Check if the message if a Hit Message.

Definition at line 244 of file StsXyterMessage.h.

References GetFlag(), and stsxyter::kFieldNotHitFlag().

Referenced by IsDummy(), and IsTsMsb().

◆ IsHitMissedEvts()

◆ IsMsErrorFlagOn()

◆ IsTsMsb()

XPU_D bool stsxyter::Message::IsTsMsb ( ) const
inline

Check if the message if a Ts_Msb.

Definition at line 248 of file StsXyterMessage.h.

References GetSubType(), IsHit(), and stsxyter::TsMsb.

◆ operator=()

XPU_D Message & stsxyter::Message::operator= ( const Message & src)
inline

Definition at line 187 of file StsXyterMessage.h.

References assign().

◆ PrintMess()

◆ PrintMessType()

◆ reset()

XPU_D void stsxyter::Message::reset ( )
inline

Definition at line 193 of file StsXyterMessage.h.

References fuData.

◆ SetBit() [1/2]

XPU_D void stsxyter::Message::SetBit ( MessField field,
uint8_t ucValue )
inline

Definition at line 238 of file StsXyterMessage.h.

References stsxyter::MessField::fusPos, and SetBit().

Referenced by SetBit().

◆ SetBit() [2/2]

XPU_D void stsxyter::Message::SetBit ( uint32_t uShift,
uint8_t uValue )
inline

Definition at line 224 of file StsXyterMessage.h.

References fuData.

Referenced by SetHitMissEvtsFlag().

◆ SetCpFlag()

XPU_D void stsxyter::Message::SetCpFlag ( bool bVal)
inline

For Status data: Sets the Status (1 bit field)

Definition at line 369 of file StsXyterMessage.h.

References stsxyter::kFieldStatCpFlag(), and SetField().

◆ SetData()

XPU_D void stsxyter::Message::SetData ( uint32_t uValue)
inline

Definition at line 197 of file StsXyterMessage.h.

References fuData.

◆ SetEmptyMsgFlag()

XPU_D void stsxyter::Message::SetEmptyMsgFlag ( bool bVal)
inline

For Empty/End of MS data data: Sets the Empty message flag (1 bit field)

Definition at line 382 of file StsXyterMessage.h.

References stsxyter::kFieldEmptyFlag(), and SetField().

◆ SetEpochVal()

XPU_D void stsxyter::Message::SetEpochVal ( uint32_t uVal)
inline

For Epoch data: Sets the Epoch (29 bit field)

Definition at line 338 of file StsXyterMessage.h.

References stsxyter::kFieldEpochVal(), and SetField().

◆ SetField() [1/2]

XPU_D void stsxyter::Message::SetField ( MessField field,
uint32_t uValue )
inline

Definition at line 237 of file StsXyterMessage.h.

References stsxyter::MessField::fusLen, stsxyter::MessField::fusPos, and SetField().

Referenced by SetField().

◆ SetField() [2/2]

XPU_D void stsxyter::Message::SetField ( uint32_t uShift,
uint32_t uLen,
uint32_t uValue )
inline

◆ SetHitAdc()

XPU_D void stsxyter::Message::SetHitAdc ( uint16_t usVal)
inline

For Hit data: Sets ADC value (5 bit field)

Definition at line 296 of file StsXyterMessage.h.

References stsxyter::kFieldHitAdc(), and SetField().

◆ SetHitChannel()

XPU_D void stsxyter::Message::SetHitChannel ( uint16_t usVal)
inline

For Hit data: Sets StsXYTER channel number (7 bit field)

Definition at line 293 of file StsXyterMessage.h.

References stsxyter::kFieldHitChannel(), and SetField().

◆ SetHitMissEvtsFlag()

XPU_D void stsxyter::Message::SetHitMissEvtsFlag ( bool bVal)
inline

For Hit data: Sets Missed event flag (1 bit field)

Definition at line 308 of file StsXyterMessage.h.

References stsxyter::kFieldHitEmFlag(), and SetBit().

◆ SetHitTime()

XPU_D void stsxyter::Message::SetHitTime ( uint16_t usVal)
inline

For Hit data: Sets Full timestamp (8 bit field, 2 MSB bits overlap removed)

Definition at line 305 of file StsXyterMessage.h.

References stsxyter::kFieldHitTs(), and SetField().

◆ SetHitTimeFull()

XPU_D void stsxyter::Message::SetHitTimeFull ( uint16_t usVal)
inline

For Hit data: Sets Full timestamp (10 bit field including 2 bits overlap)

Definition at line 299 of file StsXyterMessage.h.

References stsxyter::kFieldHitTsFull(), and SetField().

◆ SetHitTimeOver()

XPU_D void stsxyter::Message::SetHitTimeOver ( uint16_t usVal)
inline

For Hit data: Sets timestamp overlap bits (2 bits field, overlap with 2 LSBs of TS_MSB message)

Definition at line 302 of file StsXyterMessage.h.

References stsxyter::kFieldHitTsOver(), and SetField().

◆ SetMsErrorFlag()

XPU_D void stsxyter::Message::SetMsErrorFlag ( bool bVal)
inline

For End of MS data data: Sets the MS Error flag (1 bit field)

Definition at line 385 of file StsXyterMessage.h.

References stsxyter::kFieldMsErrFlag(), and SetField().

◆ SetMsErrorType()

XPU_D void stsxyter::Message::SetMsErrorType ( uint16_t usVal)
inline

For End of MS data: Sets the MS error type field (2 bit field)

Definition at line 388 of file StsXyterMessage.h.

References stsxyter::kFieldMsErrType(), and SetField().

◆ SetStatusDpbTs()

XPU_D void stsxyter::Message::SetStatusDpbTs ( uint16_t usVal)
inline

For Status data: Sets the Status (9 bit field)

Definition at line 366 of file StsXyterMessage.h.

References stsxyter::kFieldStatDpbTs(), and SetField().

◆ SetStatusLink()

XPU_D void stsxyter::Message::SetStatusLink ( uint16_t usVal)
inline

For Status data: Sets the Status (9 bit field)

Definition at line 357 of file StsXyterMessage.h.

References stsxyter::kFieldStatLinkId(), and SetField().

◆ SetStatusStatus()

XPU_D void stsxyter::Message::SetStatusStatus ( uint16_t usVal)
inline

For Status data: Sets the Status (4 bit field)

Definition at line 363 of file StsXyterMessage.h.

References stsxyter::kFieldStatStatus(), and SetField().

◆ SetStatusSxTs()

XPU_D void stsxyter::Message::SetStatusSxTs ( uint16_t usVal)
inline

For Status data: Sets the Status (6 bit field)

Definition at line 360 of file StsXyterMessage.h.

References stsxyter::kFieldStatSxTs(), and SetField().

◆ SetTsMsbVal()

XPU_D void stsxyter::Message::SetTsMsbVal ( uint32_t uVal)
inline

For TS MSB data: Sets the TS MSB (22 bit field)

Definition at line 331 of file StsXyterMessage.h.

References stsxyter::kFieldTsMsbVal(), and SetField().

Member Data Documentation

◆ fuData

uint32_t stsxyter::Message::fuData
protected

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