mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 01:00:02 +02:00
Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya
This commit is contained in:
commit
cac353748e
@ -156,7 +156,7 @@ class DetectorPythonInterface {
|
||||
return g;
|
||||
}
|
||||
|
||||
int getNumberOfDetectors() { return det.getNumberOfDetectors(); }
|
||||
int getNumberOfDetectors() { return det.size(); }
|
||||
|
||||
std::string getRunStatus() {
|
||||
auto s = det.getRunStatus();
|
||||
@ -234,7 +234,7 @@ class DetectorPythonInterface {
|
||||
}
|
||||
|
||||
void setRateCorrection(std::vector<double> tau) {
|
||||
for (int i = 0; i < det.getNumberOfDetectors(); ++i)
|
||||
for (size_t i = 0; i < det.size(); ++i)
|
||||
det.setRateCorrection(tau[i], i);
|
||||
}
|
||||
|
||||
@ -334,7 +334,7 @@ class DetectorPythonInterface {
|
||||
|
||||
std::vector<double> getMeasuredPeriod() {
|
||||
std::vector<double> mp;
|
||||
for (int i = 0; i < det.getNumberOfDetectors(); ++i) {
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
auto t = det.getTimeLeft(slsDetectorDefs::MEASURED_PERIOD, i);
|
||||
mp.push_back(static_cast<double>(t) * 1E-9);
|
||||
}
|
||||
@ -342,7 +342,7 @@ class DetectorPythonInterface {
|
||||
}
|
||||
std::vector<double> getMeasuredSubPeriod() {
|
||||
std::vector<double> mp;
|
||||
for (int i = 0; i < det.getNumberOfDetectors(); ++i) {
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
auto t = det.getTimeLeft(slsDetectorDefs::MEASURED_SUBPERIOD, i);
|
||||
mp.push_back(static_cast<double>(t) * 1E-9);
|
||||
}
|
||||
@ -550,7 +550,7 @@ class DetectorPythonInterface {
|
||||
|
||||
std::vector<std::string> getDetectorType() {
|
||||
std::vector<std::string> detector_type;
|
||||
for (int i = 0; i < det.getNumberOfDetectors(); ++i) {
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
detector_type.push_back(det.getDetectorTypeAsString(i));
|
||||
}
|
||||
return detector_type;
|
||||
@ -577,8 +577,8 @@ class DetectorPythonInterface {
|
||||
// detectors return a vector of strings
|
||||
std::vector<int> getReceiverStreamingPort() {
|
||||
std::vector<int> vec;
|
||||
vec.reserve(det.getNumberOfDetectors());
|
||||
for (int i = 0; i < det.getNumberOfDetectors(); ++i) {
|
||||
vec.reserve(det.size());
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
vec.push_back(det.getReceiverStreamingPort(i));
|
||||
}
|
||||
return vec;
|
||||
@ -590,8 +590,8 @@ class DetectorPythonInterface {
|
||||
|
||||
std::vector<int> getReceiverUDPPort() {
|
||||
std::vector<int> vec;
|
||||
vec.reserve(det.getNumberOfDetectors());
|
||||
for (int i = 0; i < det.getNumberOfDetectors(); ++i) {
|
||||
vec.reserve(det.size());
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
vec.push_back(det.getReceiverUDPPort(i));
|
||||
}
|
||||
return vec;
|
||||
@ -599,8 +599,8 @@ class DetectorPythonInterface {
|
||||
|
||||
std::vector<int> getReceiverUDPPort2() {
|
||||
std::vector<int> vec;
|
||||
vec.reserve(det.getNumberOfDetectors());
|
||||
for (int i = 0; i < det.getNumberOfDetectors(); ++i) {
|
||||
vec.reserve(det.size());
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
vec.push_back(det.getReceiverUDPPort2(i));
|
||||
}
|
||||
return vec;
|
||||
@ -990,7 +990,7 @@ void DetectorPythonInterface::setReadoutFlag(const std::string flag_name) {
|
||||
|
||||
std::vector<double> DetectorPythonInterface::getRateCorrection() {
|
||||
std::vector<double> rate_corr;
|
||||
for (int i = 0; i < det.getNumberOfDetectors(); ++i) {
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
rate_corr.push_back(det.getRateCorrection(i));
|
||||
}
|
||||
return rate_corr;
|
||||
|
@ -8,8 +8,8 @@
|
||||
class multiSlsDetector;
|
||||
namespace sls {
|
||||
using ns = std::chrono::nanoseconds;
|
||||
using Positions = const std::vector<int> &;
|
||||
using defs = slsDetectorDefs;
|
||||
class MacAddr;
|
||||
class IpAddr;
|
||||
|
||||
/**
|
||||
* \class Detector
|
||||
@ -936,7 +936,7 @@ class Detector {
|
||||
|
||||
// TODO!
|
||||
// int enableDataStreamingToClient(int enable = -1);
|
||||
// int enableDataStreamingFromReceiver(int enable = -1, int detPos = -1)
|
||||
void enableDataStreamingFromReceiver(bool enable, Positions pos = {});
|
||||
|
||||
/** [TODO! All?] */
|
||||
void setTenGigaEnabled(bool value, Positions pos = {});
|
||||
@ -1318,6 +1318,104 @@ class Detector {
|
||||
Positions pos = {});
|
||||
|
||||
Result<std::string> getAdditionalJsonHeader(Positions pos = {}) const;
|
||||
|
||||
Result<std::string> getAdditionalJsonParameter(const std::string &key,
|
||||
Positions pos = {}) const;
|
||||
|
||||
void setAdditionalJsonParameter(const std::string &key,
|
||||
const std::string &value,
|
||||
Positions pos = {});
|
||||
|
||||
// TODO these should probably be the same
|
||||
Result<std::string> getReceiverStreamingIP(Positions pos = {}) const;
|
||||
|
||||
void setReceiverDataStreamingOutIP(const std::string &ip,
|
||||
Positions pos = {});
|
||||
|
||||
Result<std::string> getClientStreamingIP(Positions pos = {}) const;
|
||||
|
||||
// TODO these should probably be the same
|
||||
void setClientDataStreamingInIP(const std::string &ip, Positions pos = {});
|
||||
|
||||
Result<int> getReceiverStreamingPort(Positions pos = {}) const;
|
||||
|
||||
/** Single detector or all since ports are calculated*/
|
||||
void setReceiverDataStreamingOutPort(int port, int module_id = -1);
|
||||
|
||||
Result<int> getClientStreamingPort(Positions pos = {}) const;
|
||||
|
||||
/** Single detector or all since ports are calculated*/
|
||||
void setClientDataStreamingInPort(int port, int module_id = -1);
|
||||
|
||||
/** [Jungfrau] */
|
||||
Result<int> getSelectedUDPInterface(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Jungfrau]
|
||||
* @param interface interface to select, either 1 or 2
|
||||
* */
|
||||
void selectUDPInterface(int interface, Positions pos = {});
|
||||
|
||||
Result<int> getNumberofUDPInterfaces(Positions pos = {}) const;
|
||||
void setNumberofUDPInterfaces(int n, Positions pos = {});
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
Result<int> getReceiverUDPPort2(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
void setReceiverUDPPort2(int udpport, Positions pos = {});
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
Result<int> getReceiverUDPPort(Positions pos = {}) const;
|
||||
|
||||
/** [Eiger][Jungfrau] */
|
||||
void setReceiverUDPPort(int udpport, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
Result<MacAddr> getReceiverUDPMAC2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] */
|
||||
void setReceiverUDPMAC2(const std::string &udpmac, Positions pos = {});
|
||||
|
||||
Result<MacAddr> getReceiverUDPMAC(Positions pos = {}) const;
|
||||
void setReceiverUDPMAC(const std::string &udpmac, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
Result<IpAddr> getReceiverUDPIP2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] */
|
||||
void setReceiverUDPIP2(const std::string &udpip, Positions pos = {});
|
||||
|
||||
Result<IpAddr> getReceiverUDPIP(Positions pos = {}) const;
|
||||
void setReceiverUDPIP(const std::string &udpip, Positions pos = {});
|
||||
|
||||
Result<std::string> getReceiverHostname(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Validates and sets the receiver.
|
||||
* Also updates the receiver with all the shared memory parameters
|
||||
* significant for the receiver Also configures the detector to the receiver
|
||||
* as UDP destination
|
||||
* @param receiver receiver hostname or IP address */
|
||||
void setReceiverHostname(const std::string &receiver, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
Result<IpAddr> getDetectorIP2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] */
|
||||
void setDetectorIP2(const std::string &detectorIP, Positions pos = {});
|
||||
|
||||
Result<IpAddr> getDetectorIP(Positions pos = {}) const;
|
||||
void setDetectorIP(const std::string &detectorIP, Positions pos = {});
|
||||
|
||||
Result<MacAddr> getDetectorMAC(Positions pos = {}) const;
|
||||
void setDetectorMAC(const std::string &detectorMAC, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
Result<MacAddr> getDetectorMAC2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] */
|
||||
void setDetectorMAC2(const std::string &detectorMAC, Positions pos = {});
|
||||
};
|
||||
|
||||
} // namespace sls
|
@ -375,7 +375,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* Returns the number of detectors in the multidetector structure
|
||||
* @returns number of detectors
|
||||
*/
|
||||
int size() const;//
|
||||
size_t size() const;//
|
||||
|
||||
/**
|
||||
* Returns number of detectors in dimension d
|
||||
@ -963,14 +963,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the detector MAC address
|
||||
*/
|
||||
std::string setDetectorMAC(const std::string &detectorMAC, int detPos = -1);
|
||||
std::string setDetectorMAC(const std::string &detectorMAC, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the detector MAC address
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the detector MAC address
|
||||
*/
|
||||
std::string getDetectorMAC(int detPos = -1);
|
||||
std::string getDetectorMAC(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Validates the format of the detector MAC address (bottom half) and sets
|
||||
@ -980,14 +980,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @returns the detector MAC address (bottom half)
|
||||
*/
|
||||
std::string setDetectorMAC2(const std::string &detectorMAC,
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the detector MAC address (bottom half) Jungfrau only
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the detector MAC address (bottom half)
|
||||
*/
|
||||
std::string getDetectorMAC2(int detPos = -1);
|
||||
std::string getDetectorMAC2(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Validates the format of the detector IP address and sets it
|
||||
@ -995,14 +995,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the detector IP address
|
||||
*/
|
||||
std::string setDetectorIP(const std::string &detectorIP, int detPos = -1);
|
||||
std::string setDetectorIP(const std::string &detectorIP, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the detector IP address
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the detector IP address
|
||||
*/
|
||||
std::string getDetectorIP(int detPos = -1) const;
|
||||
std::string getDetectorIP(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* Validates the format of the detector IP address (bottom half) and sets it
|
||||
@ -1011,14 +1011,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the detector IP address (bottom half)
|
||||
*/
|
||||
std::string setDetectorIP2(const std::string &detectorIP, int detPos = -1);
|
||||
std::string setDetectorIP2(const std::string &detectorIP, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the detector IP address (bottom half) Jungfrau only
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the detector IP address (bottom half)
|
||||
*/
|
||||
std::string getDetectorIP2(int detPos = -1) const;
|
||||
std::string getDetectorIP2(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* Validates and sets the receiver.
|
||||
@ -1030,14 +1030,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @returns the receiver IP address from shared memory
|
||||
*/
|
||||
std::string setReceiverHostname(const std::string &receiver,
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the receiver IP address
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver IP address
|
||||
*/
|
||||
std::string getReceiverHostname(int detPos = -1) const;
|
||||
std::string getReceiverHostname(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP IP address and sets it
|
||||
@ -1045,14 +1045,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP IP address
|
||||
*/
|
||||
std::string setReceiverUDPIP(const std::string &udpip, int detPos = -1);
|
||||
std::string setReceiverUDPIP(const std::string &udpip, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP IP address
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP IP address
|
||||
*/
|
||||
std::string getReceiverUDPIP(int detPos = -1) const;
|
||||
std::string getReceiverUDPIP(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP IP address (bottom half) and
|
||||
@ -1061,14 +1061,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP IP address (bottom half)
|
||||
*/
|
||||
std::string setReceiverUDPIP2(const std::string &udpip, int detPos = -1);
|
||||
std::string setReceiverUDPIP2(const std::string &udpip, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP IP address (bottom half) Jungfrau only
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP IP address (bottom half)
|
||||
*/
|
||||
std::string getReceiverUDPIP2(int detPos = -1) const;
|
||||
std::string getReceiverUDPIP2(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP MAC address and sets it
|
||||
@ -1076,14 +1076,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP MAC address
|
||||
*/
|
||||
std::string setReceiverUDPMAC(const std::string &udpmac, int detPos = -1);
|
||||
std::string setReceiverUDPMAC(const std::string &udpmac, int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP MAC address
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP MAC address
|
||||
*/
|
||||
std::string getReceiverUDPMAC(int detPos = -1) const;
|
||||
std::string getReceiverUDPMAC(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP MAC address (bottom half) and
|
||||
@ -1107,14 +1107,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP port
|
||||
*/
|
||||
int setReceiverUDPPort(int udpport, int detPos = -1);
|
||||
int setReceiverUDPPort(int udpport, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP port
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP port
|
||||
*/
|
||||
int getReceiverUDPPort(int detPos = -1) const;
|
||||
int getReceiverUDPPort(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* Sets the receiver UDP port 2 (Eiger and Jungfrau only)
|
||||
@ -1122,7 +1122,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP port 2
|
||||
*/
|
||||
int setReceiverUDPPort2(int udpport, int detPos = -1);
|
||||
int setReceiverUDPPort2(int udpport, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP port 2 of same interface (Eiger and Jungfrau
|
||||
@ -1130,7 +1130,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP port 2 of same interface
|
||||
*/
|
||||
int getReceiverUDPPort2(int detPos = -1) const;
|
||||
int getReceiverUDPPort2(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* Sets the number of UDP interfaces to stream data from detector (Jungfrau
|
||||
@ -1139,7 +1139,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the number of interfaces
|
||||
*/
|
||||
int setNumberofUDPInterfaces(int n, int detPos = -1);
|
||||
int setNumberofUDPInterfaces(int n, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the number of UDP interfaces to stream data from detector
|
||||
@ -1147,7 +1147,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the number of interfaces
|
||||
*/
|
||||
int getNumberofUDPInterfaces(int detPos = -1) const;
|
||||
int getNumberofUDPInterfaces(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* Selects the UDP interfaces to stream data from detector. Effective only
|
||||
@ -1164,7 +1164,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the interface selected
|
||||
*/
|
||||
int getSelectedUDPInterface(int detPos = -1) const;
|
||||
int getSelectedUDPInterface(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* (advanced users)
|
||||
@ -1183,7 +1183,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the client zmq port
|
||||
*/
|
||||
int getClientStreamingPort(int detPos = -1);
|
||||
int getClientStreamingPort(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* (advanced users)
|
||||
@ -1193,7 +1193,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* individual detectors using i
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
void setReceiverDataStreamingOutPort(int i = -1, int detPos = -1);
|
||||
void setReceiverDataStreamingOutPort(int i = -1, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the receiver zmq port
|
||||
@ -1202,7 +1202,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver zmq port
|
||||
*/
|
||||
int getReceiverStreamingPort(int detPos = -1);
|
||||
int getReceiverStreamingPort(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* (advanced users)
|
||||
@ -1212,7 +1212,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
void setClientDataStreamingInIP(const std::string &ip = "",
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the client zmq ip
|
||||
@ -1221,7 +1221,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the client zmq ip
|
||||
*/
|
||||
std::string getClientStreamingIP(int detPos = -1);
|
||||
std::string getClientStreamingIP(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* (advanced users)
|
||||
@ -1231,7 +1231,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
void setReceiverDataStreamingOutIP(const std::string &ip = "",
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the receiver zmq ip
|
||||
@ -1240,7 +1240,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver zmq ip
|
||||
*/
|
||||
std::string getReceiverStreamingIP(int detPos = -1);
|
||||
std::string getReceiverStreamingIP(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Sets the transmission delay for left, right or entire frame
|
||||
@ -1251,7 +1251,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @returns transmission delay
|
||||
*/
|
||||
int setDetectorNetworkParameter(networkParameter index, int delay,
|
||||
int detPos = -1);
|
||||
int detPos = -1); //maybe not needed in API
|
||||
|
||||
/**
|
||||
* Sets the additional json header
|
||||
@ -1260,14 +1260,14 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @returns additional json header, default is empty
|
||||
*/
|
||||
std::string setAdditionalJsonHeader(const std::string &jsonheader,
|
||||
int detPos = -1);
|
||||
int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the additional json header
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the additional json header, default is empty
|
||||
*/
|
||||
std::string getAdditionalJsonHeader(int detPos = -1);
|
||||
std::string getAdditionalJsonHeader(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Sets the value for the additional json header parameter if found, else
|
||||
|
@ -723,6 +723,11 @@ Result<int> Detector::getReceiverStreamingTimer(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setReceiverStreamingTimer, pos, -1);
|
||||
}
|
||||
|
||||
void Detector::enableDataStreamingFromReceiver(bool enable, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::enableDataStreamingFromReceiver, pos,
|
||||
static_cast<int>(enable));
|
||||
}
|
||||
|
||||
void Detector::setTenGigaEnabled(bool value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::enableTenGigabitEthernet, pos,
|
||||
static_cast<int>(value));
|
||||
@ -1160,4 +1165,162 @@ Result<std::string> Detector::getAdditionalJsonHeader(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getAdditionalJsonHeader, pos);
|
||||
}
|
||||
|
||||
Result<std::string> Detector::getAdditionalJsonParameter(const std::string &key,
|
||||
Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getAdditionalJsonParameter, pos, key);
|
||||
}
|
||||
|
||||
void Detector::setAdditionalJsonParameter(const std::string &key,
|
||||
const std::string &value,
|
||||
Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setAdditionalJsonParameter, pos, key, value);
|
||||
}
|
||||
|
||||
Result<std::string> Detector::getReceiverStreamingIP(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverStreamingIP, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverDataStreamingOutIP(const std::string &ip,
|
||||
Positions pos) {
|
||||
// TODO! probably in one call
|
||||
pimpl->Parallel(&slsDetector::setReceiverStreamingIP, pos, ip);
|
||||
enableDataStreamingFromReceiver(false, pos);
|
||||
enableDataStreamingFromReceiver(true, pos);
|
||||
}
|
||||
|
||||
Result<std::string> Detector::getClientStreamingIP(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClientStreamingIP, pos);
|
||||
}
|
||||
|
||||
void Detector::setClientDataStreamingInIP(const std::string &ip,
|
||||
Positions pos) {
|
||||
// TODO! probably in one call
|
||||
pimpl->Parallel(&slsDetector::setClientStreamingIP, pos, ip);
|
||||
pimpl->enableDataStreamingToClient(0);
|
||||
pimpl->enableDataStreamingToClient(1);
|
||||
}
|
||||
|
||||
Result<int> Detector::getReceiverStreamingPort(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverStreamingPort, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverDataStreamingOutPort(int port, int module_id) {
|
||||
pimpl->setReceiverDataStreamingOutPort(port, module_id);
|
||||
}
|
||||
|
||||
Result<int> Detector::getClientStreamingPort(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClientStreamingPort, pos);
|
||||
}
|
||||
|
||||
void Detector::setClientDataStreamingInPort(int port, int module_id) {
|
||||
pimpl->setClientDataStreamingInPort(port, module_id);
|
||||
}
|
||||
|
||||
Result<int> Detector::getSelectedUDPInterface(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getSelectedUDPInterface, pos);
|
||||
}
|
||||
|
||||
void Detector::selectUDPInterface(int interface, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::selectUDPInterface, pos, interface);
|
||||
}
|
||||
|
||||
Result<int> Detector::getNumberofUDPInterfaces(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getNumberofUDPInterfaces, pos);
|
||||
}
|
||||
|
||||
void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setNumberofUDPInterfaces, pos, n);
|
||||
|
||||
pimpl->enableDataStreamingToClient(0);
|
||||
pimpl->enableDataStreamingToClient(1);
|
||||
enableDataStreamingFromReceiver(false, pos);
|
||||
enableDataStreamingFromReceiver(true, pos);
|
||||
}
|
||||
|
||||
Result<int> Detector::getReceiverUDPPort2(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverUDPPort2, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverUDPPort2(int udpport, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReceiverUDPPort2, pos, udpport);
|
||||
}
|
||||
|
||||
Result<int> Detector::getReceiverUDPPort(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverUDPPort, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverUDPPort(int udpport, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReceiverUDPPort, pos, udpport);
|
||||
}
|
||||
|
||||
Result<MacAddr> Detector::getReceiverUDPMAC2(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverUDPMAC2, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverUDPMAC2(const std::string &udpmac, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReceiverUDPMAC2, pos, udpmac);
|
||||
}
|
||||
|
||||
Result<MacAddr> Detector::getReceiverUDPMAC(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverUDPMAC, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverUDPMAC(const std::string &udpmac, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReceiverUDPMAC, pos, udpmac);
|
||||
}
|
||||
|
||||
Result<IpAddr> Detector::getReceiverUDPIP2(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverUDPIP2, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverUDPIP2(const std::string &udpip, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReceiverUDPIP2, pos, udpip);
|
||||
}
|
||||
|
||||
Result<IpAddr> Detector::getReceiverUDPIP(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverUDPIP, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverUDPIP(const std::string &udpip, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReceiverUDPIP, pos, udpip);
|
||||
}
|
||||
|
||||
Result<std::string> Detector::getReceiverHostname(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReceiverHostname, pos);
|
||||
}
|
||||
|
||||
void Detector::setReceiverHostname(const std::string &receiver, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReceiverHostname, pos, receiver);
|
||||
}
|
||||
|
||||
Result<IpAddr> Detector::getDetectorIP2(Positions pos) const{
|
||||
return pimpl->Parallel(&slsDetector::getDetectorIP2, pos);
|
||||
}
|
||||
|
||||
void Detector::setDetectorIP2(const std::string &detectorIP, Positions pos){
|
||||
pimpl->Parallel(&slsDetector::setDetectorIP2, pos, detectorIP);
|
||||
}
|
||||
|
||||
Result<IpAddr> Detector::getDetectorIP(Positions pos) const{
|
||||
return pimpl->Parallel(&slsDetector::getDetectorIP, pos);
|
||||
}
|
||||
|
||||
void Detector::setDetectorIP(const std::string &detectorIP, Positions pos){
|
||||
pimpl->Parallel(&slsDetector::setDetectorIP, pos, detectorIP);
|
||||
}
|
||||
|
||||
Result<MacAddr> Detector::getDetectorMAC(Positions pos) const{
|
||||
return pimpl->Parallel(&slsDetector::getDetectorMAC, pos);
|
||||
}
|
||||
void Detector::setDetectorMAC(const std::string &detectorMAC, Positions pos){
|
||||
pimpl->Parallel(&slsDetector::setDetectorMAC, pos, detectorMAC);
|
||||
}
|
||||
|
||||
Result<MacAddr> Detector::getDetectorMAC2(Positions pos) const{
|
||||
return pimpl->Parallel(&slsDetector::getDetectorMAC2, pos);
|
||||
}
|
||||
void Detector::setDetectorMAC2(const std::string &detectorMAC, Positions pos){
|
||||
pimpl->Parallel(&slsDetector::setDetectorMAC2, pos, detectorMAC);
|
||||
}
|
||||
|
||||
} // namespace sls
|
@ -655,7 +655,7 @@ std::string multiSlsDetector::getDetectorTypeAsString(int detPos) {
|
||||
return sls::concatenateIfDifferent(r);
|
||||
}
|
||||
|
||||
int multiSlsDetector::size() const { return detectors.size(); }
|
||||
size_t multiSlsDetector::size() const { return detectors.size(); }
|
||||
|
||||
int multiSlsDetector::getNumberOfDetectors(dimension d) const {
|
||||
return multi_shm()->numberOfDetector[d];
|
||||
@ -1926,6 +1926,7 @@ void multiSlsDetector::setReceiverDataStreamingOutIP(const std::string &ip,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string multiSlsDetector::getReceiverStreamingIP(int detPos) {
|
||||
// single
|
||||
if (detPos >= 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user