artdaq_core_demo
v1_07_01
|
A Fragment designed to contain data received from the network in UDP datagrams. More...
#include <artdaq-core-demo/Overlays/UDPFragment.hh>
Classes | |
struct | Header |
The UDPFragment::Header contains information about the payload size and the "data type" of the UDP data. More... | |
struct | Metadata |
Metadata describing the contents of the UDPFragment. More... | |
Public Member Functions | |
UDPFragment (artdaq::Fragment const &f) | |
The UDPFragment constructor. More... | |
Header::event_size_t | hdr_event_size () const |
Get the current value of the Header::event_size field. More... | |
Header::data_type_t | hdr_data_type () const |
Get the current value of the Header::type field. More... | |
size_t | udp_data_words () const |
Get the number of words in the UDPFragment payload. More... | |
uint8_t const * | dataBegin () const |
Returns a const pointer to the start of the UDP payload. More... | |
uint8_t const * | dataEnd () const |
Returns a const pointer to the end of the UDP payload. More... | |
Static Public Member Functions | |
static constexpr size_t | hdr_size_words () |
Gets the size_words variable from the artdaq::Header. More... | |
Protected Member Functions | |
Header const * | header_ () const |
Get a const pointer to the UDPFragment::Header. More... | |
Static Protected Member Functions | |
static constexpr size_t | bytes_per_word_ () |
Translates between data words (type Header::data_t) and bytes. More... | |
A Fragment designed to contain data received from the network in UDP datagrams.
Definition at line 20 of file UDPFragment.hh.
|
inlineexplicit |
The UDPFragment constructor.
f | The raw artdaq::Fragment object to overlay |
The constructor simply sets its const private member "artdaq_Fragment_" to refer to the artdaq::Fragment object
Definition at line 79 of file UDPFragment.hh.
|
inlinestaticprotected |
Translates between data words (type Header::data_t) and bytes.
Definition at line 127 of file UDPFragment.hh.
|
inline |
Returns a const pointer to the start of the UDP payload.
Definition at line 108 of file UDPFragment.hh.
|
inline |
Returns a const pointer to the end of the UDP payload.
Definition at line 117 of file UDPFragment.hh.
|
inline |
Get the current value of the Header::type field.
Definition at line 91 of file UDPFragment.hh.
|
inline |
Get the current value of the Header::event_size field.
Definition at line 86 of file UDPFragment.hh.
|
inlinestatic |
Gets the size_words variable from the artdaq::Header.
Definition at line 96 of file UDPFragment.hh.
|
inlineprotected |
Get a const pointer to the UDPFragment::Header.
header_() simply takes the address of the start of this overlay's data (i.e., where the UDPFragment::Header object begins) and casts it as a pointer to UDPFragment::Header
Definition at line 137 of file UDPFragment.hh.
|
inline |
Get the number of words in the UDPFragment payload.
Definition at line 102 of file UDPFragment.hh.