mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 00:50:42 +02:00
python compiles
This commit is contained in:
parent
ca054626e6
commit
7242a6901a
@ -72,21 +72,21 @@ class DetectorPythonInterface {
|
||||
det.setReceiverHostname(hostname, det_id);
|
||||
}
|
||||
|
||||
std::string getReceiverUDPIP(int det_id = -1) const {
|
||||
return det.getReceiverUDPIP(det_id);
|
||||
}
|
||||
// std::string getReceiverUDPIP(int det_id = -1) const {
|
||||
// return det.getReceiverUDPIP(det_id);
|
||||
// }
|
||||
|
||||
void setReceiverUDPIP(std::string ip, int det_id = -1) {
|
||||
det.setReceiverUDPIP(ip, det_id);
|
||||
}
|
||||
// void setReceiverUDPIP(std::string ip, int det_id = -1) {
|
||||
// det.setReceiverUDPIP(ip, det_id);
|
||||
// }
|
||||
|
||||
std::string getReceiverUDPMAC(int det_id = -1) {
|
||||
return det.getReceiverUDPMAC(det_id);
|
||||
}
|
||||
// std::string getReceiverUDPMAC(int det_id = -1) {
|
||||
// return det.getReceiverUDPMAC(det_id);
|
||||
// }
|
||||
|
||||
void setReceiverUDPMAC(std::string mac, int det_id = -1) {
|
||||
det.setReceiverUDPMAC(mac, det_id);
|
||||
}
|
||||
// void setReceiverUDPMAC(std::string mac, int det_id = -1) {
|
||||
// det.setReceiverUDPMAC(mac, det_id);
|
||||
// }
|
||||
|
||||
void startReceiver() { det.startReceiver(); }
|
||||
void stopReceiver() { det.stopReceiver(); }
|
||||
@ -570,45 +570,31 @@ class DetectorPythonInterface {
|
||||
det.setReceiverDataStreamingOutPort(value, det_id);
|
||||
}
|
||||
|
||||
std::vector<int> getReceiverUDPPort() {
|
||||
std::vector<int> vec;
|
||||
vec.reserve(det.size());
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
vec.push_back(det.getReceiverUDPPort(i));
|
||||
}
|
||||
return vec;
|
||||
}
|
||||
|
||||
std::vector<int> getReceiverUDPPort2() {
|
||||
std::vector<int> vec;
|
||||
vec.reserve(det.size());
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
vec.push_back(det.getReceiverUDPPort2(i));
|
||||
}
|
||||
return vec;
|
||||
}
|
||||
|
||||
void setReceiverUDPPort(int port, int det_id) {
|
||||
det.setReceiverUDPPort(port, det_id);
|
||||
}
|
||||
void setReceiverUDPPort2(int port, int det_id) {
|
||||
det.setReceiverUDPPort2(port, det_id);
|
||||
}
|
||||
|
||||
// //Set network parameter for all modules if det_id == -1 otherwise the
|
||||
// module
|
||||
// //specified with det_id.
|
||||
// void setDetectorNetworkParameter(std::string par_name, std::string par,
|
||||
// const int det_id) {
|
||||
// auto p = networkNameToEnum(par_name);
|
||||
// if (det_id == -1) {
|
||||
// det.setDetectorNetworkParameter(p, par);
|
||||
// } else {
|
||||
// det.setDetectorNetworkParameter(p, par, det_id);
|
||||
// std::vector<int> getReceiverUDPPort() {
|
||||
// std::vector<int> vec;
|
||||
// vec.reserve(det.size());
|
||||
// for (size_t i = 0; i < det.size(); ++i) {
|
||||
// vec.push_back(det.getReceiverUDPPort(i));
|
||||
// }
|
||||
// return vec;
|
||||
// }
|
||||
|
||||
// std::vector<int> getReceiverUDPPort2() {
|
||||
// std::vector<int> vec;
|
||||
// vec.reserve(det.size());
|
||||
// for (size_t i = 0; i < det.size(); ++i) {
|
||||
// vec.push_back(det.getReceiverUDPPort2(i));
|
||||
// }
|
||||
// return vec;
|
||||
// }
|
||||
|
||||
// void setReceiverUDPPort(int port, int det_id) {
|
||||
// det.setReceiverUDPPort(port, det_id);
|
||||
// }
|
||||
// void setReceiverUDPPort2(int port, int det_id) {
|
||||
// det.setReceiverUDPPort2(port, det_id);
|
||||
// }
|
||||
|
||||
void configureNetworkParameters() { det.configureMAC(); }
|
||||
|
||||
std::string getLastClientIP() { return det.getLastClientIP(); }
|
||||
std::string getReceiverLastClientIP() {
|
||||
|
@ -118,7 +118,6 @@ void init_experimental(py::module &m) {
|
||||
py::arg() = Positions{})
|
||||
|
||||
// Network Configuration (Detector<->Receiver)
|
||||
.def("configureMAC", &Detector::configureMAC, py::arg() = Positions{})
|
||||
.def("getNumberofUDPInterfaces", &Detector::getNumberofUDPInterfaces,
|
||||
py::arg() = Positions{})
|
||||
|
||||
|
@ -210,22 +210,20 @@ PYBIND11_MODULE(_sls_detector, m) {
|
||||
&DetectorPythonInterface::getReceiverStreamingPort)
|
||||
.def("setReceiverStreamingPort",
|
||||
&DetectorPythonInterface::setReceiverStreamingPort)
|
||||
.def("getReceiverUDPPort", &DetectorPythonInterface::getReceiverUDPPort)
|
||||
.def("getReceiverUDPPort2",
|
||||
&DetectorPythonInterface::getReceiverUDPPort2)
|
||||
.def("setReceiverUDPPort", &DetectorPythonInterface::setReceiverUDPPort)
|
||||
.def("setReceiverUDPPort2",
|
||||
&DetectorPythonInterface::setReceiverUDPPort2)
|
||||
.def("setReceiverUDPIP", &DetectorPythonInterface::setReceiverUDPIP)
|
||||
.def("getReceiverUDPIP", &DetectorPythonInterface::getReceiverUDPIP)
|
||||
.def("getReceiverUDPMAC", &DetectorPythonInterface::getReceiverUDPMAC)
|
||||
.def("setReceiverUDPMAC", &DetectorPythonInterface::setReceiverUDPMAC)
|
||||
// .def("getReceiverUDPPort", &DetectorPythonInterface::getReceiverUDPPort)
|
||||
// .def("getReceiverUDPPort2",
|
||||
// &DetectorPythonInterface::getReceiverUDPPort2)
|
||||
// .def("setReceiverUDPPort", &DetectorPythonInterface::setReceiverUDPPort)
|
||||
// .def("setReceiverUDPPort2",
|
||||
// &DetectorPythonInterface::setReceiverUDPPort2)
|
||||
// .def("setReceiverUDPIP", &DetectorPythonInterface::setReceiverUDPIP)
|
||||
// .def("getReceiverUDPIP", &DetectorPythonInterface::getReceiverUDPIP)
|
||||
// .def("getReceiverUDPMAC", &DetectorPythonInterface::getReceiverUDPMAC)
|
||||
// .def("setReceiverUDPMAC", &DetectorPythonInterface::setReceiverUDPMAC)
|
||||
|
||||
.def("getReceiverPort", &DetectorPythonInterface::getReceiverPort)
|
||||
.def("setReceiverPort", &DetectorPythonInterface::setReceiverPort)
|
||||
|
||||
.def("configureNetworkParameters",
|
||||
&DetectorPythonInterface::configureNetworkParameters)
|
||||
.def("getDelayFrame", &DetectorPythonInterface::getDelayFrame)
|
||||
.def("setDelayFrame", &DetectorPythonInterface::setDelayFrame)
|
||||
.def("getDelayLeft", &DetectorPythonInterface::getDelayLeft)
|
||||
|
Loading…
x
Reference in New Issue
Block a user