This commit is contained in:
Erik Frojdh
2019-08-09 16:12:26 +02:00
parent 206740efd6
commit dea402a7e7
3 changed files with 130 additions and 27 deletions

View File

@ -9,6 +9,7 @@ class multiSlsDetector;
namespace sls {
using ns = std::chrono::nanoseconds;
class MacAddr;
class IpAddr;
/**
* \class Detector
@ -1274,7 +1275,6 @@ class Detector {
void selectUDPInterface(int interface, Positions pos = {});
Result<int> getNumberofUDPInterfaces(Positions pos = {}) const;
void setNumberofUDPInterfaces(int n, Positions pos = {});
/** [Eiger][Jungfrau] */
@ -1292,8 +1292,48 @@ class Detector {
/** [Jungfrau] */
Result<MacAddr> getReceiverUDPMAC2(Positions pos = {}) const;
/** [Jungfrau] */
/** [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

View File

@ -976,14 +976,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
@ -993,14 +993,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
@ -1008,14 +1008,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
@ -1024,14 +1024,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.
@ -1043,14 +1043,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
@ -1058,14 +1058,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
@ -1074,14 +1074,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
@ -1089,14 +1089,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