This commit is contained in:
Erik Frojdh
2019-06-12 10:41:50 +02:00
parent 1fed3553b9
commit 55229f77a3
7 changed files with 14 additions and 64 deletions

View File

@ -284,9 +284,11 @@ PYBIND11_MODULE(_sls_detector, m) {
.def("getPatternWord", &Detector::getPatternWord, py::arg("addr"),
py::arg("det_id") = -1)
.def("setPatternIOControl", &Detector::setPatternIOControl, py::arg("word"), py::arg("det_id") = -1)
.def("setPatternClockControl", &Detector::setPatternClockControl, py::arg("word"), py::arg("det_id") = -1)
.def("setPatternIOControl", &Detector::setPatternIOControl,
py::arg("word"), py::arg("det_id") = -1)
.def("setPatternClockControl", &Detector::setPatternClockControl,
py::arg("word"), py::arg("det_id") = -1)
.def("setPatternWaitAddr", &Detector::setPatternWaitAddr,
py::arg("level"), py::arg("addr"), py::arg("det_id") = -1)
.def("getPatternWaitAddr", &Detector::getPatternWaitAddr,
@ -303,8 +305,6 @@ PYBIND11_MODULE(_sls_detector, m) {
.def("getNumberOfDetectors", &Detector::getNumberOfDetectors)
.def("getDetectorGeometry", &Detector::getDetectorGeometry);
// Experimental API to use the multi directly and inherit from to reduce
// code duplication need to investigate how to handle documentation
py::class_<multiSlsDetector> multiDetectorApi(m, "multiDetectorApi");
@ -316,10 +316,15 @@ PYBIND11_MODULE(_sls_detector, m) {
py::arg() = -1, py::arg("det_id") = -1),
py::cpp_function(&multiSlsDetector::setOnline, py::arg(),
py::arg("flag"), py::arg("det_id") = -1))
// .def("_setOnline", &multiSlsDetector::setOnline, py::arg("flag") =
// -1,
// py::arg("det_id") = -1)
.def_property("exptime",
py::cpp_function(&multiSlsDetector::setExposureTime,
py::arg(), py::arg() = -1, py::arg() = 0,
py::arg("det_id") = -1),
py::cpp_function(&multiSlsDetector::setExposureTime,
py::arg(), py::arg() = -1, py::arg() = 0,
py::arg("det_id") = -1))
.def("getExposureTime", &multiSlsDetector::setExposureTime, py::arg()=-1,
py::arg() = 0, py::arg("det_id") = -1)
.def_property_readonly(
"hostname", py::cpp_function(&multiSlsDetector::getHostname,
py::arg(), py::arg("det_id") = -1))