Pottu
Public Member Functions | Public Attributes | List of all members
pottu::dataitem_data_t Struct Reference

Dataitem used to read the dataitem of type itemtype_e::DATA. More...

#include <dataitem.hpp>

Public Member Functions

uint32_t getChannelIdent_adc () const
 ADC number in a module. Calculated from the field chi.
 
uint32_t getChannelIdent_flag () const
 Flag in the field chi. More...
 
uint32_t getChannelIdent_module () const
 Module number. Calculated from the field chi.
 
void set (uint64_t timestamp_, uint32_t adc_, uint32_t chi_, bool veto_, bool fail_)
 Sets the fields. More...
 
void toCStringFull (char *s, uint32_t len) const
 Get the content as a c string. More...
 

Public Attributes

uint32_t timestamp: 28
 Lowest 28 bits of the timestamp.
 
uint32_t res0: 4
 Empty 4 bits. Can be used for word order guessing.
 
uint32_t adc: 16
 ADC value. Maximum 16 bits, typically 14 bits.
 
uint32_t chi: 12
 Channel ident. Can be used as a DAQ channel number.
 
uint32_t veto: 1
 Flag to mark that the event is vetoed.
 
uint32_t fail: 1
 Flag to mark that the event is fail.
 
uint32_t itemtype: 2
 Type of the item. One of itemtype_e enum.
 

Detailed Description

Dataitem used to read the dataitem of type itemtype_e::DATA.

This struct is used as a one member in union dataitem_t.

Member Function Documentation

◆ getChannelIdent_flag()

uint32_t pottu::dataitem_data_t::getChannelIdent_flag ( ) const
inline

Flag in the field chi.

Typically 1 means that the data is dc-level, not actual data.

◆ set()

void pottu::dataitem_data_t::set ( uint64_t  timestamp_,
uint32_t  adc_,
uint32_t  chi_,
bool  veto_,
bool  fail_ 
)
inline

Sets the fields.

This can be used if there is need to produce tdr data.

◆ toCStringFull()

void pottu::dataitem_data_t::toCStringFull ( char *  s,
uint32_t  len 
) const
inline

Get the content as a c string.

This is useful for debugging.


The documentation for this struct was generated from the following file: