mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 08:17:13 +02:00
Removeudpcache (#65)
* WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * solved eiger 1-10g issue * some fixes for remove udp cache to work * bug fix virtual * removed special handling of rx_udpip
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "network_utils.h"
|
||||
|
||||
/** Macro to make an integer command.
|
||||
* CMDNAME name of the function that does the command
|
||||
@ -72,6 +73,7 @@
|
||||
return os.str(); \
|
||||
}
|
||||
|
||||
|
||||
namespace sls {
|
||||
|
||||
class CmdProxy {
|
||||
@ -127,7 +129,19 @@ class CmdProxy {
|
||||
{"lock", &CmdProxy::lock},
|
||||
{"rx_readfreq", &CmdProxy::rx_readfreq},
|
||||
{"rx_padding", &CmdProxy::rx_padding},
|
||||
{"rx_framesperfile", &CmdProxy::rx_framesperfile}};
|
||||
{"rx_framesperfile", &CmdProxy::rx_framesperfile},
|
||||
{"detectormac", &CmdProxy::detectormac},
|
||||
{"detectormac2", &CmdProxy::detectormac2},
|
||||
{"rx_udpmac", &CmdProxy::rx_udpmac},
|
||||
{"rx_udpmac2", &CmdProxy::rx_udpmac2},
|
||||
{"detectorip", &CmdProxy::detectorip},
|
||||
{"detectorip2", &CmdProxy::detectorip2},
|
||||
{"rx_udpip", &CmdProxy::rx_udpip},
|
||||
{"rx_udpip2", &CmdProxy::rx_udpip2},
|
||||
{"rx_udpport", &CmdProxy::rx_udpport},
|
||||
{"rx_udpport2", &CmdProxy::rx_udpport2},
|
||||
{"numinterfaces", &CmdProxy::numinterfaces},
|
||||
{"selinterface", &CmdProxy::selinterface}};
|
||||
|
||||
StringMap depreciated_functions{{"r_readfreq", "rx_readfreq"},
|
||||
{"r_padding", "rx_padding"},
|
||||
@ -179,6 +193,7 @@ class CmdProxy {
|
||||
"[0, 1]\n\tgets partial frames padding enable in the "
|
||||
"receiver. 0 does not pad partial frames(fastest), 1 "
|
||||
"(default) pads partial frames");
|
||||
|
||||
INTEGER_COMMAND(rx_framesperfile, getFramesPerFile, setFramesPerFile,
|
||||
std::stoi, "[n_frames]\n\tNumber of frames per file");
|
||||
|
||||
@ -197,6 +212,42 @@ class CmdProxy {
|
||||
|
||||
INTEGER_COMMAND(findex, getAcquisitionIndex, setAcquisitionIndex, std::stoi,
|
||||
"[0, 1]\n\tFile index");
|
||||
|
||||
INTEGER_COMMAND(detectormac, getSourceUDPMAC, setSourceUDPMAC, MacAddr,
|
||||
"[x:x:x:x:x:x]\n\tMac address of the detector (source) udp interface. ");
|
||||
|
||||
INTEGER_COMMAND(detectormac2, getSourceUDPMAC2, setSourceUDPMAC2, MacAddr,
|
||||
"[x:x:x:x:x:x]\n\t[Jungfrau] Mac address of the bottom half of detector (source) udp interface. ");
|
||||
|
||||
INTEGER_COMMAND(rx_udpmac, getDestinationUDPMAC, setDestinationUDPMAC, MacAddr,
|
||||
"[x:x:x:x:x:x]\n\tMac address of the receiver (destination) udp interface. Can be unused as rx_hostname/rx_udpip retrieves it.");
|
||||
|
||||
INTEGER_COMMAND(rx_udpmac2, getDestinationUDPMAC2, setDestinationUDPMAC2, MacAddr,
|
||||
"[x:x:x:x:x:x]\n\t[Jungfrau] Mac address of the receiver (destination) udp interface where the second half of detector data is sent to. Can be unused as rx_hostname/rx_udpip2 retrieves it.")
|
||||
|
||||
INTEGER_COMMAND(detectorip, getSourceUDPIP, setSourceUDPIP, IpAddr,
|
||||
"[x.x.x.x]\n\tIp address of the detector (source) udp interface. Must be same subnet as destination udp ip.");
|
||||
|
||||
INTEGER_COMMAND(detectorip2, getSourceUDPIP2, setSourceUDPIP2, IpAddr,
|
||||
"[x.x.x.x]\n\t[Jungfrau] Ip address of the bottom half of detector (source) udp interface. Must be same subnet as destination udp ip2.");
|
||||
|
||||
INTEGER_COMMAND(rx_udpip, getDestinationUDPIP, setDestinationUDPIP, IpAddr,
|
||||
"[x.x.x.x]\n\tIp address of the receiver (destination) udp interface.");
|
||||
|
||||
INTEGER_COMMAND(rx_udpip2, getDestinationUDPIP2, setDestinationUDPIP2, IpAddr,
|
||||
"[x.x.x.x]\n\t[Jungfrau] Ip address of the receiver (destination) udp interface where the second half of detector data is sent to.");
|
||||
|
||||
INTEGER_COMMAND(rx_udpport, getDestinationUDPPort, setDestinationUDPPort, std::stoi,
|
||||
"[n]\n\tPort number of the receiver (destination) udp interface.");
|
||||
|
||||
INTEGER_COMMAND(rx_udpport2, getDestinationUDPPort2, setDestinationUDPPort2, std::stoi,
|
||||
"[n]\n\t[Jungfrau] Port number of the receiver (destination) udp interface where the second half of detector data is sent to.\n[Eiger] Port number of the reciever (desintation) udp interface where the right half of the detector data is sent to.");
|
||||
|
||||
INTEGER_COMMAND(numinterfaces, getNumberofUDPInterfaces, setNumberofUDPInterfaces, std::stoi,
|
||||
"[1, 2]\n\t[Jungfrau] Number of udp interfaces to stream data from detector. Default: 1.");
|
||||
|
||||
INTEGER_COMMAND(selinterface, getSelectedUDPInterface, selectUDPInterface, std::stoi,
|
||||
"[0, 1]\n\t[Jungfrau] The udp interface to stream data from detector. Effective only when number of interfaces is 1. Default: 0 (outer)");
|
||||
|
||||
INTEGER_COMMAND(parallel, getParallelMode, setParallelMode, std::stoi,
|
||||
"[0, 1]\n\tEnable or disable parallel mode. [Eiger]");
|
||||
|
@ -263,12 +263,6 @@ class Detector {
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
/** Configures the destination for UDP packets in the detector
|
||||
* Needed only if you use a custom receiver (not slsReceiver)
|
||||
* as it is already included in setReceiverHostname.
|
||||
*/
|
||||
void configureMAC(Positions pos = {}); // TODO: find a reasonable name
|
||||
|
||||
/** [Jungfrau] */
|
||||
Result<int> getNumberofUDPInterfaces(Positions pos = {}) const;
|
||||
|
||||
@ -291,13 +285,13 @@ class Detector {
|
||||
* 10G Eiger and other detectors, the source UDP IP must be in the
|
||||
* same subnet of the destination UDP IP
|
||||
*/
|
||||
void setSourceUDPIP(const std::string &ip, Positions pos = {});
|
||||
void setSourceUDPIP(const IpAddr ip, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] bottom half */
|
||||
Result<IpAddr> getSourceUDPIP2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] bottom half */
|
||||
void setSourceUDPIP2(const std::string &ip, Positions pos = {});
|
||||
void setSourceUDPIP2(const IpAddr ip, Positions pos = {});
|
||||
|
||||
Result<MacAddr> getSourceUDPMAC(Positions pos = {}) const;
|
||||
|
||||
@ -306,24 +300,24 @@ class Detector {
|
||||
* Others can be anything (beware of certain bits)
|
||||
*/
|
||||
|
||||
void setSourceUDPMAC(const std::string &mac, Positions pos = {});
|
||||
void setSourceUDPMAC(const MacAddr mac, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] bottom half */
|
||||
Result<MacAddr> getSourceUDPMAC2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] bottom half */
|
||||
void setSourceUDPMAC2(const std::string &mac, Positions pos = {});
|
||||
void setSourceUDPMAC2(const MacAddr mac, Positions pos = {});
|
||||
|
||||
Result<IpAddr> getDestinationUDPIP(Positions pos = {}) const;
|
||||
|
||||
/** IP of the interface in receiver that the detector sends data to */
|
||||
void setDestinationUDPIP(const std::string &ip, Positions pos = {});
|
||||
void setDestinationUDPIP(const IpAddr ip, Positions pos = {});
|
||||
|
||||
/** [Jungfrau bottom half] */
|
||||
Result<IpAddr> getDestinationUDPIP2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau bottom half] */
|
||||
void setDestinationUDPIP2(const std::string &ip, Positions pos = {});
|
||||
void setDestinationUDPIP2(const IpAddr ip, Positions pos = {});
|
||||
|
||||
Result<MacAddr> getDestinationUDPMAC(Positions pos = {}) const;
|
||||
|
||||
@ -331,13 +325,13 @@ class Detector {
|
||||
* Only needed if you use a custom receiver (not slsReceiver)
|
||||
* Must be followed by configuremac.
|
||||
*/
|
||||
void setDestinationUDPMAC(const std::string &mac, Positions pos = {});
|
||||
void setDestinationUDPMAC(const MacAddr mac, Positions pos = {});
|
||||
|
||||
/** [Jungfrau bottom half] */
|
||||
Result<MacAddr> getDestinationUDPMAC2(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau bottom half] */
|
||||
void setDestinationUDPMAC2(const std::string &mac, Positions pos = {});
|
||||
void setDestinationUDPMAC2(const MacAddr mac, Positions pos = {});
|
||||
|
||||
Result<int> getDestinationUDPPort(Positions pos = {}) const;
|
||||
|
||||
|
@ -582,7 +582,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* Configures in detector the destination for UDP packets
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
void configureMAC(int detPos = -1); //
|
||||
//void configureMAC(int detPos = -1); //TODO
|
||||
|
||||
/**
|
||||
* Set starting frame number for the next acquisition
|
||||
@ -840,73 +840,6 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
uint32_t clearBit(uint32_t addr, int n, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Validates the format of the detector MAC address and sets it
|
||||
* @param detectorMAC detector MAC address
|
||||
* @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); //
|
||||
|
||||
/**
|
||||
* 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); //
|
||||
|
||||
/**
|
||||
* Validates the format of the detector MAC address (bottom half) and sets
|
||||
* it (Jungfrau only)
|
||||
* @param detectorMAC detector MAC address (bottom half)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the detector MAC address (bottom half)
|
||||
*/
|
||||
std::string setDetectorMAC2(const std::string &detectorMAC,
|
||||
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); //
|
||||
|
||||
/**
|
||||
* //TODO: custom ip (eiger 10G and other detectors), use 0.0.0.0 and test
|
||||
* Validates the format of the detector IP address and sets it
|
||||
* @param detectorIP detector IP address
|
||||
* @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); //
|
||||
|
||||
/**
|
||||
* 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; //
|
||||
|
||||
/**
|
||||
* Validates the format of the detector IP address (bottom half) and sets it
|
||||
* (Jungfrau only)
|
||||
* @param detectorIP detector IP address (bottom half)
|
||||
* @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); //
|
||||
|
||||
/**
|
||||
* 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; //
|
||||
|
||||
/**
|
||||
* Validates and sets the receiver.
|
||||
* Also updates the receiver with all the shared memory parameters
|
||||
@ -927,108 +860,12 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
std::string getReceiverHostname(int detPos = -1) const; //
|
||||
|
||||
/**
|
||||
* TODO: replace this with setEthernetInterface
|
||||
* Validates the format of the receiver UDP IP address and sets it
|
||||
* @param udpip receiver UDP IP address
|
||||
* @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); //
|
||||
|
||||
/**
|
||||
* 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; //
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP IP address (bottom half) and
|
||||
* sets it(Jungfrau only)
|
||||
* @param udpip receiver UDP IP address (bottom half)
|
||||
* @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); //
|
||||
|
||||
/**
|
||||
* 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; //
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP MAC address and sets it
|
||||
* @param udpmac receiver UDP MAC address
|
||||
* @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); //
|
||||
|
||||
/**
|
||||
* 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; //
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP MAC address (bottom half) and
|
||||
* sets it (Jungfrau only)
|
||||
* @param udpmac receiver UDP MAC address (bottom half)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP MAC address (bottom half)
|
||||
*/
|
||||
std::string setReceiverUDPMAC2(const std::string &udpmac, int detPos = -1);
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP MAC address (bottom half) Jungfrau only
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP MAC address (bottom half)
|
||||
*/
|
||||
std::string getReceiverUDPMAC2(int detPos = -1) const;
|
||||
|
||||
/**
|
||||
* Sets the receiver UDP port
|
||||
* @param udpport receiver UDP port
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the receiver UDP port
|
||||
*/
|
||||
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; //
|
||||
|
||||
/**
|
||||
* Sets the receiver UDP port 2 (Eiger and Jungfrau only)
|
||||
* @param udpport receiver UDP port 2
|
||||
* @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); //
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP port 2 of same interface (Eiger and Jungfrau
|
||||
* only)
|
||||
* @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; //
|
||||
|
||||
/**
|
||||
* Sets the number of UDP interfaces to stream data from detector (Jungfrau
|
||||
* ets the number of UDP interfaces to stream data from detector (Jungfrau
|
||||
* only)
|
||||
* @param n number of interfaces. Options 1 or 2.
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the number of interfaces
|
||||
*/
|
||||
int setNumberofUDPInterfaces(int n, int detPos = -1); //
|
||||
void setNumberofUDPInterfaces(int n, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Returns the number of UDP interfaces to stream data from detector
|
||||
@ -1036,16 +873,15 @@ 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) ; //
|
||||
|
||||
/**
|
||||
* Selects the UDP interfaces to stream data from detector. Effective only
|
||||
* when number of interfaces is 1. (Jungfrau only)
|
||||
* @param n selected interface. Options 1 or 2.
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the interface selected
|
||||
*/
|
||||
int selectUDPInterface(int n, int detPos = -1);
|
||||
void selectUDPInterface(int n, int detPos = -1);
|
||||
|
||||
/**
|
||||
* Returns the UDP interfaces to stream data from detector. Effective only
|
||||
@ -1053,7 +889,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) ; //
|
||||
|
||||
/**
|
||||
* (advanced users)
|
||||
|
@ -13,7 +13,7 @@
|
||||
class ServerInterface;
|
||||
|
||||
#define SLS_SHMAPIVERSION 0x190726
|
||||
#define SLS_SHMVERSION 0x190816
|
||||
#define SLS_SHMVERSION 0x190830
|
||||
|
||||
/**
|
||||
* @short structure allocated in shared memory to store detector settings for
|
||||
@ -89,45 +89,6 @@ struct sharedSlsDetector {
|
||||
/** is the TCP port used to communicate between client and the receiver */
|
||||
int rxTCPPort;
|
||||
|
||||
/** is the UDP port used to send data from detector to receiver */
|
||||
int rxUDPPort;
|
||||
|
||||
/** is the port used to communicate between second half module of
|
||||
* Eiger/ Jungfrau detector and the receiver*/
|
||||
int rxUDPPort2;
|
||||
|
||||
/** ip address of the receiver for the detector to send packets to**/
|
||||
sls::IpAddr rxUDPIP;
|
||||
|
||||
/** ip address of the receiver for the 2nd interface of the detector to send
|
||||
* packets to**/
|
||||
sls::IpAddr rxUDPIP2;
|
||||
|
||||
/** mac address of receiver for the detector to send packets to **/
|
||||
sls::MacAddr rxUDPMAC;
|
||||
|
||||
/** mac address of receiver for the 2nd interface of the detector to send
|
||||
* packets to **/
|
||||
sls::MacAddr rxUDPMAC2;
|
||||
|
||||
/** mac address of the detector **/
|
||||
sls::MacAddr detectorMAC;
|
||||
|
||||
/** mac address of the 2nd interface of the detector **/
|
||||
sls::MacAddr detectorMAC2;
|
||||
|
||||
/** ip address of the detector **/
|
||||
sls::IpAddr detectorIP;
|
||||
|
||||
/** ip address of the 2nd interface of the detector **/
|
||||
sls::IpAddr detectorIP2;
|
||||
|
||||
/** number of udp interface */
|
||||
int numUDPInterfaces;
|
||||
|
||||
/** selected udp interface */
|
||||
int selectedUDPInterface;
|
||||
|
||||
/** is set if the receiver hostname given and is connected,
|
||||
* unset if socket connection is not possible */
|
||||
bool useReceiverFlag;
|
||||
@ -719,63 +680,7 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
uint32_t clearBit(uint32_t addr, int n);
|
||||
|
||||
/**
|
||||
* Validates the format of the detector MAC address and sets it \sa
|
||||
* sharedSlsDetector
|
||||
* @param detectorMAC detector MAC address
|
||||
* @returns the detector MAC address
|
||||
*/
|
||||
std::string setDetectorMAC(const std::string &detectorMAC);
|
||||
|
||||
/**
|
||||
* Returns the detector MAC address\sa sharedSlsDetector
|
||||
* @returns the detector MAC address
|
||||
*/
|
||||
sls::MacAddr getDetectorMAC();
|
||||
|
||||
/**
|
||||
* Validates the format of the detector MAC address (bottom half) and sets
|
||||
* it (Jungfrau only)
|
||||
* @param detectorMAC detector MAC address (bottom half)
|
||||
* @returns the detector MAC address (bottom half)
|
||||
*/
|
||||
std::string setDetectorMAC2(const std::string &detectorMAC);
|
||||
|
||||
/**
|
||||
* Returns the detector MAC address (bottom half) Jungfrau only
|
||||
* @returns the detector MAC address (bottom half)
|
||||
*/
|
||||
sls::MacAddr getDetectorMAC2();
|
||||
|
||||
/**
|
||||
* Validates the format of the detector IP address and sets it \sa
|
||||
* sharedSlsDetector
|
||||
* @param detectorIP detector IP address
|
||||
* @returns the detector IP address
|
||||
*/
|
||||
std::string setDetectorIP(const std::string &detectorIP);
|
||||
|
||||
/**
|
||||
* Returns the detector IP address\sa sharedSlsDetector
|
||||
* @returns the detector IP address
|
||||
*/
|
||||
sls::IpAddr getDetectorIP() const;
|
||||
|
||||
/**
|
||||
* Validates the format of the detector IP address (bottom half) and sets it
|
||||
* (Jungfrau only)
|
||||
* @param detectorIP detector IP address (bottom half)
|
||||
* @returns the detector IP address (bottom half)
|
||||
*/
|
||||
std::string setDetectorIP2(const std::string &detectorIP);
|
||||
|
||||
/**
|
||||
* Returns the detector IP address (bottom half) Jungfrau only
|
||||
* @returns the detector IP address (bottom half)
|
||||
*/
|
||||
sls::IpAddr getDetectorIP2() 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
|
||||
@ -791,104 +696,164 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
std::string getReceiverHostname() const;
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP IP address and sets it \sa
|
||||
* sharedSlsDetector
|
||||
* @param udpip receiver UDP IP address
|
||||
* @returns the receiver UDP IP address
|
||||
/**
|
||||
* Validates the format of the detector MAC address and sets it
|
||||
* @param mac detector MAC address
|
||||
*/
|
||||
std::string setReceiverUDPIP(const std::string &udpip);
|
||||
void setSourceUDPMAC(const sls::MacAddr mac);
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP IP address\sa sharedSlsDetector
|
||||
* Returns the detector MAC address
|
||||
* @returns the detector MAC address
|
||||
*/
|
||||
sls::MacAddr getSourceUDPMAC();
|
||||
|
||||
/**
|
||||
* Validates the format of the detector MAC address (bottom half) and sets
|
||||
* it (Jungfrau only)
|
||||
* @param mac detector MAC address (bottom half)
|
||||
*/
|
||||
void setSourceUDPMAC2(const sls::MacAddr mac);
|
||||
|
||||
/**
|
||||
* Returns the detector MAC address (bottom half) Jungfrau only
|
||||
* @returns the detector MAC address (bottom half)
|
||||
*/
|
||||
sls::MacAddr getSourceUDPMAC2();
|
||||
|
||||
/**
|
||||
* Validates the format of the detector IP address and sets it
|
||||
* @param ip detector IP address
|
||||
*/
|
||||
void setSourceUDPIP(const sls::IpAddr ip);
|
||||
|
||||
/**
|
||||
* Returns the detector IP address
|
||||
* @returns the detector IP address
|
||||
*/
|
||||
sls::IpAddr getSourceUDPIP();
|
||||
|
||||
/**
|
||||
* Validates the format of the detector IP address (bottom half) and sets it
|
||||
* (Jungfrau only)
|
||||
* @param ip detector IP address (bottom half)
|
||||
*/
|
||||
void setSourceUDPIP2(const sls::IpAddr ip);
|
||||
|
||||
/**
|
||||
* Returns the detector IP address (bottom half) Jungfrau only
|
||||
* @returns the detector IP address (bottom half)
|
||||
*/
|
||||
sls::IpAddr getSourceUDPIP2();
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP IP address and sets it
|
||||
* If slsReceiver used, Gets receiver udp mac address and sends it to the detector
|
||||
* @param ip receiver UDP IP address
|
||||
*/
|
||||
void setDestinationUDPIP(const sls::IpAddr ip);
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP IP address
|
||||
* If slsReceiver used, Gets receiver udp mac address and sends it to the detector
|
||||
* @returns the receiver UDP IP address
|
||||
*/
|
||||
sls::IpAddr getReceiverUDPIP() const;
|
||||
sls::IpAddr getDestinationUDPIP();
|
||||
|
||||
/**
|
||||
* Gets destination udp ip from detector,
|
||||
* if 0, it converts rx_hostname to ip and
|
||||
* updates both detector and receiver
|
||||
*/
|
||||
void updateRxDestinationUDPIP();
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP IP address (bottom half) and
|
||||
* sets it(Jungfrau only)
|
||||
* @param udpip receiver UDP IP address (bottom half)
|
||||
* @returns the receiver UDP IP address (bottom half)
|
||||
* If slsReceiver used, Gets receiver udp mac address2 and sends it to the detector
|
||||
* @param ip receiver UDP IP address (bottom half)
|
||||
*/
|
||||
std::string setReceiverUDPIP2(const std::string &udpip);
|
||||
void setDestinationUDPIP2(const sls::IpAddr ip);
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP IP address (bottom half) Jungfrau only
|
||||
* If slsReceiver used, Gets receiver udp mac address2 and sends it to the detector
|
||||
* @returns the receiver UDP IP address (bottom half)
|
||||
*/
|
||||
sls::IpAddr getReceiverUDPIP2() const;
|
||||
sls::IpAddr getDestinationUDPIP2();
|
||||
|
||||
/**
|
||||
* Gets destination udp ip2 from detector,
|
||||
* if 0, it converts rx_hostname to ip and
|
||||
* updates both detector and receiver
|
||||
*/
|
||||
void updateRxDestinationUDPIP2();
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP MAC address and sets it
|
||||
* @param mac receiver UDP MAC address
|
||||
*/
|
||||
void setDestinationUDPMAC(const sls::MacAddr mac);
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP MAC address and sets it \sa
|
||||
* sharedSlsDetector
|
||||
* @param udpmac receiver UDP MAC address
|
||||
* Returns the receiver UDP MAC address
|
||||
* @returns the receiver UDP MAC address
|
||||
*/
|
||||
std::string setReceiverUDPMAC(const std::string &udpmac);
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP MAC address\sa sharedSlsDetector
|
||||
* @returns the receiver UDP MAC address
|
||||
*/
|
||||
sls::MacAddr getReceiverUDPMAC() const;
|
||||
sls::MacAddr getDestinationUDPMAC();
|
||||
|
||||
/**
|
||||
* Validates the format of the receiver UDP MAC address (bottom half) and
|
||||
* sets it (Jungfrau only)
|
||||
* @param udpmac receiver UDP MAC address (bottom half)
|
||||
* @returns the receiver UDP MAC address (bottom half)
|
||||
* @param mac receiver UDP MAC address (bottom half)
|
||||
*/
|
||||
std::string setReceiverUDPMAC2(const std::string &udpmac);
|
||||
void setDestinationUDPMAC2(const sls::MacAddr mac);
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP MAC address (bottom half) Jungfrau only
|
||||
* @returns the receiver UDP MAC address (bottom half)
|
||||
*/
|
||||
sls::MacAddr getReceiverUDPMAC2() const;
|
||||
sls::MacAddr getDestinationUDPMAC2();
|
||||
|
||||
/**
|
||||
* Sets the receiver UDP port\sa sharedSlsDetector
|
||||
* @param udpport receiver UDP port
|
||||
* @returns the receiver UDP port
|
||||
*/
|
||||
int setReceiverUDPPort(int udpport);
|
||||
void setDestinationUDPPort(int udpport);
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP port\sa sharedSlsDetector
|
||||
* @returns the receiver UDP port
|
||||
*/
|
||||
int getReceiverUDPPort() const;
|
||||
int getDestinationUDPPort();
|
||||
|
||||
/**
|
||||
* Sets the receiver UDP port 2\sa sharedSlsDetector (Eiger and Jungfrau
|
||||
* only)
|
||||
* @param udpport receiver UDP port 2
|
||||
* @returns the receiver UDP port 2
|
||||
*/
|
||||
int setReceiverUDPPort2(int udpport);
|
||||
void setDestinationUDPPort2(int udpport);
|
||||
|
||||
/**
|
||||
* Returns the receiver UDP port 2 of same interface\sa sharedSlsDetector
|
||||
* (Eiger and Jungfrau only)
|
||||
* @returns the receiver UDP port 2 of same interface
|
||||
*/
|
||||
int getReceiverUDPPort2() const;
|
||||
int getDestinationUDPPort2();
|
||||
|
||||
/**
|
||||
* Sets the number of UDP interfaces to stream data from detector (Jungfrau
|
||||
* only)
|
||||
* @param n number of interfaces. Options 1 or 2.
|
||||
* @returns the number of interfaces
|
||||
* @returns the number of interface
|
||||
*/
|
||||
int setNumberofUDPInterfaces(int n);
|
||||
void setNumberofUDPInterfaces(int n);
|
||||
|
||||
/**
|
||||
* Returns the number of UDP interfaces to stream data from detector
|
||||
* (Jungfrau only)
|
||||
* @returns the number of interfaces
|
||||
*/
|
||||
int getNumberofUDPInterfaces() const;
|
||||
int getNumberofUDPInterfaces();
|
||||
|
||||
/**
|
||||
* Selects the UDP interfaces to stream data from detector. Effective only
|
||||
@ -896,14 +861,14 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
* @param n selected interface. Options 1 or 2.
|
||||
* @returns the interface selected
|
||||
*/
|
||||
int selectUDPInterface(int n);
|
||||
void selectUDPInterface(int n);
|
||||
|
||||
/**
|
||||
* Returns the UDP interfaces to stream data from detector. Effective only
|
||||
* when number of interfaces is 1. (Jungfrau only)
|
||||
* @returns the interface selected
|
||||
*/
|
||||
int getSelectedUDPInterface() const;
|
||||
int getSelectedUDPInterface();
|
||||
|
||||
/**
|
||||
* Sets the client zmq port\sa sharedSlsDetector
|
||||
@ -1727,7 +1692,7 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
void *retval, size_t retval_size);
|
||||
|
||||
template <typename Arg, typename Ret>
|
||||
void sendToDetector(int fnum, const Arg &args, Ret &retval);
|
||||
void sendToDetector(int fnum, const Arg &args, Ret &retval);
|
||||
template <typename Arg>
|
||||
void sendToDetector(int fnum, const Arg &args, std::nullptr_t);
|
||||
template <typename Ret>
|
||||
|
@ -58,7 +58,6 @@ class slsDetectorCommand : public virtual slsDetectorDefs {
|
||||
static std::string helpPort(int action);
|
||||
static std::string helpLastClient(int action);
|
||||
static std::string helpOnline(int action);
|
||||
static std::string helpConfigureMac(int action);
|
||||
static std::string helpDetectorSize(int action);
|
||||
static std::string helpSettings(int action);
|
||||
static std::string helpSN(int action);
|
||||
@ -102,7 +101,6 @@ class slsDetectorCommand : public virtual slsDetectorDefs {
|
||||
std::string cmdPort(int narg, const char * const args[], int action, int detPos = -1);
|
||||
std::string cmdLastClient(int narg, const char * const args[], int action, int detPos = -1);
|
||||
std::string cmdOnline(int narg, const char * const args[], int action, int detPos = -1);
|
||||
std::string cmdConfigureMac(int narg, const char * const args[], int action, int detPos = -1);
|
||||
std::string cmdDetectorSize(int narg, const char * const args[], int action, int detPos = -1);
|
||||
std::string cmdSettings(int narg, const char * const args[], int action, int detPos = -1);
|
||||
std::string cmdSN(int narg, const char * const args[], int action, int detPos = -1);
|
||||
|
Reference in New Issue
Block a user