DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
HSIEvent.hpp
Go to the documentation of this file.
1
9#ifndef DFMESSAGES_INCLUDE_DFMESSAGES_HSIEVENT_HPP_
10#define DFMESSAGES_INCLUDE_DFMESSAGES_HSIEVENT_HPP_
11
13#include "dfmessages/Types.hpp"
14
16
17#include <cstddef>
18#include <limits>
19
20namespace dunedaq {
21namespace dfmessages {
26{
27 uint32_t header{ 0 };
28 uint32_t signal_map{ 0 };
30 uint32_t sequence_counter{ 0 };
32
33 HSIEvent() = default;
34
43 explicit HSIEvent(uint32_t head, // NOLINT(build/unsigned)
44 uint32_t signals, // NOLINT(build/unsigned)
46 uint32_t seq_count, // NOLINT(build/unsigned)
47 run_number_t run_num) // NOLINT(build/unsigned)
48 : header(head)
49 , signal_map(signals)
50 , timestamp(ts)
51 , sequence_counter(seq_count)
52 , run_number(run_num)
53 {}
54
56};
57static_assert(sizeof(HSIEvent) == 24, "HSIEvent size unexpected!");
58static_assert(offsetof(HSIEvent, header) == 0, "HSIEvent header field not at expected offset!");
59static_assert(offsetof(HSIEvent, signal_map) == 4, "HSIEvent signal_map field not at expected offset!");
60static_assert(offsetof(HSIEvent, timestamp) == 8, "HSIEvent timestamp field not at expected offset!");
61static_assert(offsetof(HSIEvent, sequence_counter) == 16, "HSIEvent sequence_counter field not at expected offset!");
62static_assert(offsetof(HSIEvent, run_number) == 20, "HSIEvent run_number field not at expected offset!");
63} // namespace dfmessages
64
66
67} // namespace dunedaq
68
69#endif // DFMESSAGES_INCLUDE_DFMESSAGES_HSIEVENT_HPP_
#define DUNE_DAQ_SERIALIZABLE(Type, typestring)
static constexpr timestamp_t s_invalid_timestamp
An invalid timestamp.
Definition Types.hpp:65
uint64_t timestamp_t
Type used to represent DUNE timing system timestamps.
Definition Types.hpp:36
daqdataformats::run_number_t run_number_t
Copy daqdataformats::run_number_t.
Definition Types.hpp:34
Including Qt Headers.
PDS Frame with unphysical timestamp detected with ts
A message used to convey an HSI event.
Definition HSIEvent.hpp:26
uint32_t header
Header field. Only contains HSI device ID at the moment // NOLINT(build/unsigned)
Definition HSIEvent.hpp:27
HSIEvent(uint32_t head, uint32_t signals, daqdataformats::timestamp_t ts, uint32_t seq_count, run_number_t run_num)
Construct a HSIEvent message.
Definition HSIEvent.hpp:43
DUNE_DAQ_SERIALIZE(HSIEvent, header, signal_map, timestamp, sequence_counter, run_number)
daqdataformats::timestamp_t timestamp
Timestamp of HSI event.
Definition HSIEvent.hpp:29
uint32_t signal_map
Bit map of signals. 1 bit, 1 signal // NOLINT(build/unsigned)
Definition HSIEvent.hpp:28
uint32_t sequence_counter
Event sequence number // NOLINT(build/unsigned)
Definition HSIEvent.hpp:30