DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
component_request.cpp
Go to the documentation of this file.
1
8
10
11#include <pybind11/pybind11.h>
12#include <pybind11/stl.h>
13
14#include <sstream>
15
16namespace py = pybind11;
17
19
20void
22{
23
24 py::class_<ComponentRequest>(m, "ComponentRequest")
25 .def(py::init())
26 .def(py::init<SourceID const&, timestamp_t const&, timestamp_t const&>())
27 .def("__str__",
28 [](const ComponentRequest& cr) {
29 std::ostringstream oss;
30 oss << cr;
31 return oss.str();
32 })
33 .def("__repr__",
34 [](const ComponentRequest& cr) {
35 std::ostringstream oss;
36 oss << "<daqdataformats::ComponentRequest " << cr << ">";
37 return oss.str();
38 })
39 .def_readonly_static("s_component_request_version", &ComponentRequest::s_component_request_version)
40 .def_readonly("version", &ComponentRequest::version)
41 .def_readonly("unused", &ComponentRequest::unused)
42 .def_readonly("component", &ComponentRequest::component)
43 .def_readonly("window_begin", &ComponentRequest::window_begin)
44 .def_readonly("window_end", &ComponentRequest::window_end);
45}
46
47} // namespace dunedaq::daqdataformats::python
void register_component_request(py::module &m)
A request sent to a Component, including the SourceID of the component and the window offset and widt...
uint32_t unused
Padding to ensure 64b alignment // NOLINT(build/unsigned).
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.