DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
detdataformats
include
detdataformats
HSIFrame.hpp
Go to the documentation of this file.
1
10
11
#ifndef DETDATAFORMATS_INCLUDE_DETDATAFORMATS_HSIFRAME_HPP_
12
#define DETDATAFORMATS_INCLUDE_DETDATAFORMATS_HSIFRAME_HPP_
13
14
#include <cstdint>
// For uint32_t etc
15
#include <limits>
16
17
namespace
dunedaq::detdataformats
{
18
19
class
HSIFrame
20
{
21
public
:
22
// The definition of the format is in terms of 32-bit words
23
using
word_t
= uint32_t;
// NOLINT
24
25
word_t
version
: 6,
detector_id
: 6,
crate
: 10,
slot
: 4,
link
: 6;
26
word_t
timestamp_low
{ std::numeric_limits<word_t>::max() };
27
word_t
timestamp_high
{ std::numeric_limits<word_t>::max() };
28
word_t
input_low
{ std::numeric_limits<word_t>::max() };
29
word_t
input_high
{ std::numeric_limits<word_t>::max() };
30
word_t
trigger
{ std::numeric_limits<word_t>::max() };
31
word_t
sequence
{ std::numeric_limits<word_t>::max() };
32
33
uint64_t
get_timestamp
() const
// NOLINT(build/unsigned)
34
{
35
return
static_cast<
uint64_t
>
(
timestamp_low
) |
// NOLINT(build/unsigned)
36
(
static_cast<
uint64_t
>
(
timestamp_high
) << 32);
// NOLINT(build/unsigned)
37
}
38
39
void
set_timestamp
(uint64_t ts)
// NOLINT(build/unsigned)
40
{
41
timestamp_low
= ts;
42
timestamp_high
= ts >> 32;
43
}
44
};
45
46
}
// namespace dunedaq::detdataformats
47
48
#include "
detail/HSIFrame.hxx
"
49
50
#endif
// DETDATAFORMATS_INCLUDE_DETDATAFORMATS_HSIFRAME_HPP_
HSIFrame.hxx
dunedaq::detdataformats::HSIFrame
Definition
HSIFrame.hpp:20
dunedaq::detdataformats::HSIFrame::get_timestamp
uint64_t get_timestamp() const
Definition
HSIFrame.hpp:33
dunedaq::detdataformats::HSIFrame::link
word_t link
Definition
HSIFrame.hpp:25
dunedaq::detdataformats::HSIFrame::set_timestamp
void set_timestamp(uint64_t ts)
Definition
HSIFrame.hpp:39
dunedaq::detdataformats::HSIFrame::word_t
uint32_t word_t
Definition
HSIFrame.hpp:23
dunedaq::detdataformats::HSIFrame::version
word_t version
Definition
HSIFrame.hpp:25
dunedaq::detdataformats::HSIFrame::sequence
word_t sequence
Definition
HSIFrame.hpp:31
dunedaq::detdataformats::HSIFrame::slot
word_t slot
Definition
HSIFrame.hpp:25
dunedaq::detdataformats::HSIFrame::timestamp_high
word_t timestamp_high
Definition
HSIFrame.hpp:27
dunedaq::detdataformats::HSIFrame::trigger
word_t trigger
Definition
HSIFrame.hpp:30
dunedaq::detdataformats::HSIFrame::detector_id
word_t detector_id
Definition
HSIFrame.hpp:25
dunedaq::detdataformats::HSIFrame::input_high
word_t input_high
Definition
HSIFrame.hpp:29
dunedaq::detdataformats::HSIFrame::input_low
word_t input_low
Definition
HSIFrame.hpp:28
dunedaq::detdataformats::HSIFrame::crate
word_t crate
Definition
HSIFrame.hpp:25
dunedaq::detdataformats::HSIFrame::timestamp_low
word_t timestamp_low
Definition
HSIFrame.hpp:26
dunedaq::detdataformats
Definition
DAQEthHeader.hpp:17
Generated on
for DUNE-DAQ by
1.16.1