mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-05-14 17:15:38 +02:00
pybindings
This commit is contained in:
+41
-30
@@ -1549,21 +1549,46 @@ void init_det(py::module &m) {
|
||||
Detector::getSYNCClock,
|
||||
py::arg() = Positions{});
|
||||
CppDetectorApi.def("getPowerList",
|
||||
(std::vector<defs::dacIndex>(Detector::*)() const) &
|
||||
(std::vector<defs::powerIndex>(Detector::*)() const) &
|
||||
Detector::getPowerList);
|
||||
CppDetectorApi.def("getPowerDAC",
|
||||
(int (Detector::*)(defs::powerIndex) const) &
|
||||
Detector::getPowerDAC,
|
||||
py::arg());
|
||||
CppDetectorApi.def("setPowerDAC",
|
||||
(void (Detector::*)(defs::powerIndex, int)) &
|
||||
Detector::setPowerDAC,
|
||||
py::arg(), py::arg());
|
||||
CppDetectorApi.def("isPowerEnabled",
|
||||
(bool (Detector::*)(defs::powerIndex) const) &
|
||||
Detector::isPowerEnabled,
|
||||
py::arg());
|
||||
CppDetectorApi.def(
|
||||
"setPowerEnabled",
|
||||
(void (Detector::*)(const std::vector<defs::powerIndex> &, bool)) &
|
||||
Detector::setPowerEnabled,
|
||||
py::arg(), py::arg());
|
||||
CppDetectorApi.def("getMeasuredPower",
|
||||
(int (Detector::*)(defs::powerIndex) const) &
|
||||
Detector::getMeasuredPower,
|
||||
py::arg());
|
||||
CppDetectorApi.def("getMeasuredCurrent",
|
||||
(int (Detector::*)(defs::powerIndex) const) &
|
||||
Detector::getMeasuredCurrent,
|
||||
py::arg());
|
||||
CppDetectorApi.def("getVoltageLimit",
|
||||
(int (Detector::*)() const) & Detector::getVoltageLimit);
|
||||
CppDetectorApi.def(
|
||||
"setVoltageLimit",
|
||||
(void (Detector::*)(const int)) & Detector::setVoltageLimit, py::arg());
|
||||
CppDetectorApi.def("getSlowADCList",
|
||||
(std::vector<defs::dacIndex>(Detector::*)() const) &
|
||||
Detector::getSlowADCList);
|
||||
CppDetectorApi.def(
|
||||
"isPowerEnabled",
|
||||
(Result<bool>(Detector::*)(defs::dacIndex, sls::Positions) const) &
|
||||
Detector::isPowerEnabled,
|
||||
"getSlowADC",
|
||||
(Result<int>(Detector::*)(defs::dacIndex, sls::Positions) const) &
|
||||
Detector::getSlowADC,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def("setPowerEnabled",
|
||||
(void (Detector::*)(const std::vector<defs::dacIndex> &,
|
||||
bool, sls::Positions)) &
|
||||
Detector::setPowerEnabled,
|
||||
py::arg(), py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def("getADCVpp",
|
||||
(Result<int>(Detector::*)(bool, sls::Positions) const) &
|
||||
Detector::getADCVpp,
|
||||
@@ -1629,21 +1654,6 @@ void init_det(py::module &m) {
|
||||
(void (Detector::*)(int, sls::Positions)) &
|
||||
Detector::setDBITClock,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"getMeasuredPower",
|
||||
(Result<int>(Detector::*)(defs::dacIndex, sls::Positions) const) &
|
||||
Detector::getMeasuredPower,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"getMeasuredCurrent",
|
||||
(Result<int>(Detector::*)(defs::dacIndex, sls::Positions) const) &
|
||||
Detector::getMeasuredCurrent,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def(
|
||||
"getSlowADC",
|
||||
(Result<int>(Detector::*)(defs::dacIndex, sls::Positions) const) &
|
||||
Detector::getSlowADC,
|
||||
py::arg(), py::arg() = Positions{});
|
||||
CppDetectorApi.def("getExternalSamplingSource",
|
||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getExternalSamplingSource,
|
||||
@@ -1766,18 +1776,19 @@ void init_det(py::module &m) {
|
||||
Detector::getPowerNames);
|
||||
CppDetectorApi.def(
|
||||
"getPowerIndex",
|
||||
(defs::dacIndex(Detector::*)(const std::string &) const) &
|
||||
(defs::powerIndex(Detector::*)(const std::string &) const) &
|
||||
Detector::getPowerIndex,
|
||||
py::arg());
|
||||
CppDetectorApi.def(
|
||||
"setPowerName",
|
||||
(void (Detector::*)(const defs::dacIndex, const std::string &)) &
|
||||
(void (Detector::*)(const defs::powerIndex, const std::string &)) &
|
||||
Detector::setPowerName,
|
||||
py::arg(), py::arg());
|
||||
CppDetectorApi.def("getPowerName",
|
||||
(std::string(Detector::*)(const defs::dacIndex) const) &
|
||||
Detector::getPowerName,
|
||||
py::arg());
|
||||
CppDetectorApi.def(
|
||||
"getPowerName",
|
||||
(std::string(Detector::*)(const defs::powerIndex) const) &
|
||||
Detector::getPowerName,
|
||||
py::arg());
|
||||
CppDetectorApi.def("setSlowADCNames",
|
||||
(void (Detector::*)(const std::vector<std::string>)) &
|
||||
Detector::setSlowADCNames,
|
||||
|
||||
Reference in New Issue
Block a user