ChimeraTK-ApplicationCore 04.06.00
Loading...
Searching...
No Matches
PyDataConsistencyGroup.cc
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
5
6namespace py = pybind11;
7
8namespace ChimeraTK {
9
10 /********************************************************************************************************************/
11
13 // DataConsistencyGroup::MatchingMode
14 py::enum_<DataConsistencyGroup::MatchingMode>(mod, "MatchingMode")
15 .value("none", DataConsistencyGroup::MatchingMode::none)
16 .value("exact", DataConsistencyGroup::MatchingMode::exact)
17 .value("historized", DataConsistencyGroup::MatchingMode::historized)
18 .export_values();
19
20 // DataConsistencyGroup
21 py::class_<PyDataConsistencyGroup>(mod, "DataConsistencyGroup")
22 .def(py::init<py::args, DataConsistencyGroup::MatchingMode, unsigned>(),
23 "Construct DataConsistencyGroup with given list of accessors", py::kw_only(),
24 py::arg("mode") = DataConsistencyGroup::MatchingMode::exact,
25 py::arg("histLen") = DataConsistencyGroup::defaultHistLen)
26 .def("add", &PyDataConsistencyGroup::add,
27 "Add register to group.\n\nThe same TransferElement can be part of multiple DataConsistencyGroups. The "
28 "register must be must be readable, and it must have AccessMode::wait_for_new_data.",
29 py::arg("element"), py::arg("histLen") = DataConsistencyGroup::defaultHistLen)
30 .def("update", &PyDataConsistencyGroup::update,
31 "This function updates consistentElements, a set of TransferElementID.\n\nIt returns true, if a consistent "
32 "state is reached. It returns false if an TransferElementID was updated, that was not added to this Group.",
33 py::arg("transferelementid"))
34 .def("getMatchingMode", &PyDataConsistencyGroup::getMatchingMode, "Return the current matching mode.");
35 }
36
37 /********************************************************************************************************************/
38
39} // namespace ChimeraTK
void add(PyTransferElementBase &acc, unsigned histLen=DataConsistencyGroup::defaultHistLen)
DataConsistencyGroup::MatchingMode getMatchingMode() const
bool update(const TransferElementID &transferelementid)
InvalidityTracer application module.
module_ module