DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
HSIFrame.hxx
Go to the documentation of this file.
1
2#include <bit>
3#include <cstddef>
4#include <type_traits>
5
7
8static_assert(std::is_trivially_copyable_v<HSIFrame>,
9 "HSIFrame isn't trivially copyable and can't be safely std::memcpy'd");
10static_assert(std::is_standard_layout_v<HSIFrame>,
11 "HSIFrame isn't standard layout; reinterpret_cast and offsetof can't safely be used with it");
12static_assert(std::endian::native == std::endian::little,
13 "The HSIFrame bitfield layout assumes little-endian architecture");
14
15static_assert(sizeof(HSIFrame) == 28, "HSIFrame struct size different than expected!");
16static_assert(offsetof(HSIFrame, timestamp_low) == 4, "HSIFrame timestamp_low field not at expected offset");
17static_assert(offsetof(HSIFrame, timestamp_high) == 8, "HSIFrame timestamp_high field not at expected offset");
18static_assert(offsetof(HSIFrame, input_low) == 12, "HSIFrame input_low field not at expected offset");
19static_assert(offsetof(HSIFrame, input_high) == 16, "HSIFrame input_high field not at expected offset");
20static_assert(offsetof(HSIFrame, trigger) == 20, "HSIFrame trigger field not at expected offset");
21static_assert(offsetof(HSIFrame, sequence) == 24, "HSIFrame sequence field not at expected offset");
22
23} // namespace dunedaq::detdataformats