From b92842262f833815c7a0efdafa7aecbbdcea2a5d Mon Sep 17 00:00:00 2001 From: Christoph Schueler Date: Wed, 11 Dec 2024 09:20:30 +0200 Subject: [PATCH] DAQ event num getter/setter --- pyxcp/cpp_ext/daqlist.hpp | 5 ++++- pyxcp/cpp_ext/extension_wrapper.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyxcp/cpp_ext/daqlist.hpp b/pyxcp/cpp_ext/daqlist.hpp index b836105..a503d04 100644 --- a/pyxcp/cpp_ext/daqlist.hpp +++ b/pyxcp/cpp_ext/daqlist.hpp @@ -37,6 +37,10 @@ class DaqList { return m_event_num; } + void set_event_num(std::uint16_t event_num) { + m_event_num = event_num; + } + bool get_stim() const { return m_stim; } @@ -75,7 +79,6 @@ class DaqList { void set_measurements_opt(const std::vector& measurements_opt) { m_measurements_opt = measurements_opt; - auto odt_count = 0u; auto total_entries = 0u; auto total_length = 0u; diff --git a/pyxcp/cpp_ext/extension_wrapper.cpp b/pyxcp/cpp_ext/extension_wrapper.cpp index 16b7a1c..36202cf 100644 --- a/pyxcp/cpp_ext/extension_wrapper.cpp +++ b/pyxcp/cpp_ext/extension_wrapper.cpp @@ -64,7 +64,7 @@ PYBIND11_MODULE(cpp_ext, m) { ) .def("__repr__", [](const DaqList& self) { return self.to_string(); }) .def_property("name", &DaqList::get_name, nullptr) - .def_property("event_num", &DaqList::get_event_num, nullptr) + .def_property("event_num", &DaqList::get_event_num, &DaqList::set_event_num) .def_property("stim", &DaqList::get_stim, nullptr) .def_property("enable_timestamps", &DaqList::get_enable_timestamps, nullptr) .def_property("measurements", &DaqList::get_measurements, nullptr)