python support for vetoalg

This commit is contained in:
Erik Frojdh
2021-07-21 14:38:45 +02:00
parent 91eba6a8b8
commit ae0d1cc0d4
3 changed files with 36 additions and 0 deletions

View File

@ -1084,6 +1084,17 @@ void init_det(py::module &m) {
sls::Positions)) &
Detector::setVetoStream,
py::arg(), py::arg() = Positions{})
.def("getVetoAlgorithm",
(Result<defs::vetoAlgorithm>(Detector::*)(
const defs::ethernetInterface, sls::Positions) const) &
Detector::getVetoAlgorithm,
py::arg(), py::arg() = Positions{})
.def("setVetoAlgorithm",
(void (Detector::*)(const defs::vetoAlgorithm,
const defs::ethernetInterface,
sls::Positions)) &
Detector::setVetoAlgorithm,
py::arg(), py::arg(), py::arg() = Positions{})
.def("getADCConfiguration",
(Result<int>(Detector::*)(const int, const int, sls::Positions)
const) &

View File

@ -293,4 +293,9 @@ void init_enums(py::module &m) {
py::overload_cast<const slsDetectorDefs::ethernetInterface &,
const slsDetectorDefs::ethernetInterface &>(
&operator&));
py::enum_<slsDetectorDefs::vetoAlgorithm>(Defs, "vetoAlgorithm")
.value("DEFAULT_ALGORITHM",
slsDetectorDefs::vetoAlgorithm::DEFAULT_ALGORITHM)
.export_values();
}