DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
ComponentRequest.hxx
Go to the documentation of this file.
1
3
4static_assert(std::is_trivially_copyable<ComponentRequest>::value,
5 "ComponentRequest isn't trivially copyable and can't be safely std::memcpy'd");
6
7static_assert(std::is_standard_layout<ComponentRequest>::value,
8 "ComponentRequest isn't standard layout; reinterpret_cast and offsetof can't safely be used with it");
9
11 "This is intentionally designed to tell the developer to update the static_assert checks (including this "
12 "one) when the version is bumped");
13
14static_assert(sizeof(ComponentRequest) == 32, "ComponentRequest struct size different than expected!");
15static_assert(offsetof(ComponentRequest, version) == 0, "ComponentRequest version field not at expected offset");
16static_assert(offsetof(ComponentRequest, unused) == 4, "ComponentRequest unused field not at expected offset");
17static_assert(offsetof(ComponentRequest, component) == 8, "ComponentRequest component field not at expected offset");
18static_assert(offsetof(ComponentRequest, window_begin) == 16,
19 "ComponentRequest window_begin field not at expected offset");
20static_assert(offsetof(ComponentRequest, window_end) == 24, "ComponentRequest window_end field not at expected offset");
21
22inline std::ostream&
23operator<<(std::ostream& o, ComponentRequest const& cr)
24{
25 return o << cr.component << ", begin: " << cr.window_begin << ", end: " << cr.window_end;
26}
27
28} // namespace dunedaq::daqdataformats
std::ostream & operator<<(std::ostream &o, ComponentRequest const &cr)
A request sent to a Component, including the SourceID of the component and the window offset and widt...
timestamp_t window_end
End of the data collection window.
static constexpr uint32_t s_component_request_version
SourceID component
The ID of the Requested Component.
timestamp_t window_begin
Start of the data collection window.