This commit is contained in:
2020-09-14 15:18:48 +02:00
parent 01921bc016
commit f061d2273a
4 changed files with 250 additions and 109 deletions

View File

@ -520,15 +520,16 @@ class Detector {
Result<IpAddr> getSourceUDPIP(Positions pos = {}) const;
/**For Eiger 1G, the detector will replace with its own DHCP IP
* 10G Eiger and other detectors, the source UDP IP must be in the
* 10G Eiger and other detectors. The source UDP IP must be in the
* same subnet of the destination UDP IP
*/
void setSourceUDPIP(const IpAddr ip, Positions pos = {});
/** [Jungfrau] bottom half */
/** [Jungfrau] bottom half [Gotthard2] veto debugging */
Result<IpAddr> getSourceUDPIP2(Positions pos = {}) const;
/** [Jungfrau] bottom half */
/** [Jungfrau] bottom half [Gotthard2] veto debugging. \n The source UDP IP
* must be in the same subnet of the destination UDP IP2 */
void setSourceUDPIP2(const IpAddr ip, Positions pos = {});
Result<MacAddr> getSourceUDPMAC(Positions pos = {}) const;
@ -537,13 +538,12 @@ class Detector {
* For Eiger 10G, the detector will replace with its own DHCP MAC + 1
* Others can be anything (beware of certain bits)
*/
void setSourceUDPMAC(const MacAddr mac, Positions pos = {});
/** [Jungfrau] bottom half */
/** [Jungfrau] bottom half [Gotthard2] veto debugging */
Result<MacAddr> getSourceUDPMAC2(Positions pos = {}) const;
/** [Jungfrau] bottom half */
/** [Jungfrau] bottom half [Gotthard2] veto debugging */
void setSourceUDPMAC2(const MacAddr mac, Positions pos = {});
Result<IpAddr> getDestinationUDPIP(Positions pos = {}) const;
@ -577,17 +577,16 @@ class Detector {
Result<int> getDestinationUDPPort(Positions pos = {}) const;
/** module_id is -1 for all detectors, ports for each module is calculated
* (increments) */
/** Default is 50001. \n If module_id is -1, ports for each module is
* calculated (incremented by 1 if no 2nd interface) */
void setDestinationUDPPort(int port, int module_id = -1);
/** [Eiger right port][Jungfrau bottom half] */
/** [Eiger] right port[Jungfrau] bottom half [Gotthard2] veto debugging */
Result<int> getDestinationUDPPort2(Positions pos = {}) const;
/** [Eiger right port][Jungfrau bottom half]
* module_id is -1 for all detectors, ports for each module is calculated
* (increments)
*/
/** [Eiger] right port[Jungfrau] bottom half [Gotthard2] veto debugging \n
* Default is 50002. \n If module_id is -1, ports for each module is
* calculated (incremented by 1 if no 2nd interface)*/
void setDestinationUDPPort2(int port, int module_id = -1);
void reconfigureUDPDestination(Positions pos = {});
@ -831,10 +830,10 @@ class Detector {
/** Zmq port for data to be streamed out of the receiver. \n
* Also restarts receiver zmq streaming if enabled. \n Default is 30001. \n
* Modified only when using an intermediate process after receiver. \n Must
* be different for every detector (and udp port). \n module_id is -1 for
* all detectors, ports for each module is calculated (increments) Restarts
* receiver zmq sockets only if it was already enabled
* Must be different for every detector (and udp port). \n module_id is -1
* for all detectors, ports for each module is calculated (increment by 1 if
* no 2nd interface). \n Restarts receiver zmq sockets only if it was
* already enabled
*/
void setRxZmqPort(int port, int module_id = -1);
@ -848,16 +847,22 @@ class Detector {
Result<int> getClientZmqPort(Positions pos = {}) const;
/**
* Modified only when using an intermediate process between receiver and
* gui/client. Module_id is -1 for all detectors, ports for each module is
* calculated (increments) Restarts client zmq sockets only if it was
* already enabled
/** Port number to listen to zmq data streamed out from receiver or
* intermediate process. \n Must be different for every detector (and udp
* port). \n Module_id is -1 for all detectors, ports for each module is
* calculated (increment by 1 if no 2nd interface). \n Restarts client zmq
* sockets only if it was already enabled \n Default connects to receiver
* zmq streaming out port (30001).
*/
void setClientZmqPort(int port, int module_id = -1);
Result<IpAddr> getClientZmqIp(Positions pos = {}) const;
/** Ip Address to listen to zmq data streamed out from receiver or
* intermediate process. Default connects to receiver zmq Ip Address (from
* rx_hostname). Modified only when using an intermediate process between
* receiver and client(gui). Also restarts client zmq streaming if enabled.
*/
void setClientZmqIp(const IpAddr ip, Positions pos = {});
///@{
@ -1165,7 +1170,7 @@ class Detector {
/** [Gotthard2] */
Result<bool> getVeto(Positions pos = {}) const;
/** [Gotthard2] */
/** [Gotthard2] Default disabled */
void setVeto(const bool enable, Positions pos = {});
/** [Gotthard2] */
@ -1611,6 +1616,8 @@ class Detector {
* [Gotthard2] only in continuous mode */
Result<ns> getMeasurementTime(Positions pos = {}) const;
/** get user details from shared memory (hostname, type, PID, User, Date)
*/
std::string getUserDetails() const;
Result<uint64_t> getRxCurrentFrameIndex(Positions pos = {}) const;

View File

@ -2631,7 +2631,9 @@ std::string CmdProxy::UserDetails(int action) {
std::ostringstream os;
os << cmd << ' ';
if (action == defs::HELP_ACTION) {
os << "\n\tUser details from shared memory." << '\n';
os << "\n\tUser details from shared memory (hostname, type, PID, User, "
"Date)."
<< '\n';
} else if (action == defs::GET_ACTION) {
if (det_id != -1) {
throw sls::RuntimeError("Cannot execute this at module level");

View File

@ -1303,9 +1303,12 @@ class CmdProxy {
/* dacs */
DAC_COMMAND(vthreshold, getDAC, setDAC, defs::VTHRESHOLD,
"[dac or mV value][(optional unit) mV] \n\t[Eiger][Mythen3] "
"Detector threshold voltage for single photon counters.");
DAC_COMMAND(
vthreshold, getDAC, setDAC, defs::VTHRESHOLD,
"[dac or mV value][(optional unit) mV] \n\t[Eiger][Mythen3] "
"Detector threshold voltage for single photon counters.\n\t[Eiger] "
"Sets vcmp_ll, vcmp_lr, vcmp_rl, vcmp_rr and vcp to the same value. "
"\n\t[Mythen3] Sets vth1, vth2 and vth3 to the same value.");
DAC_COMMAND(vsvp, getDAC, setDAC, defs::VSVP,
"[dac or mV value][(optional unit) mV] \n\t[Eiger] Dac for "
@ -1669,16 +1672,21 @@ class CmdProxy {
INTEGER_COMMAND(udp_srcip, getSourceUDPIP, setSourceUDPIP, IpAddr,
"[x.x.x.x]\n\tIp address of the detector (source) udp "
"interface. Must be same subnet as destination udp ip.");
"interface. Must be same subnet as destination udp "
"ip.\n\t[Eiger] Set only for 10G. For 1G, detector will "
"replace with its own DHCP IP address.");
INTEGER_COMMAND(
udp_srcip2, 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.");
"[x.x.x.x]\n\t[Jungfrau][Gotthard2] Ip address of the detector "
"(source) udp interface 2. Must be same subnet as destination udp "
"ip2.\n\t [Jungfrau] bottom half \n\t [Gotthard2] veto debugging.");
INTEGER_COMMAND(udp_srcmac, getSourceUDPMAC, setSourceUDPMAC, MacAddr,
"[x:x:x:x:x:x]\n\tMac address of the detector (source) udp "
"interface. ");
INTEGER_COMMAND(
udp_srcmac, getSourceUDPMAC, setSourceUDPMAC, MacAddr,
"[x:x:x:x:x:x]\n\tMac address of the detector (source) udp "
"interface. \n\t[Eiger] Do not set as detector will replace with its "
"own DHCP Mac (1G) or DHCP Mac + 1 (10G).");
INTEGER_COMMAND(udp_srcmac2, getSourceUDPMAC2, setSourceUDPMAC2, MacAddr,
"[x:x:x:x:x:x]\n\t[Jungfrau] Mac address of the bottom "
@ -1696,21 +1704,23 @@ class CmdProxy {
"[x:x:x:x:x:x]\n\t[Jungfrau] Mac address of the receiver (destination) "
"udp interface 2. Not mandatory to set as udp_dstip2 retrieves it from "
"slsReceiver process but must be set if you use a custom receiver (not "
"slsReceiver). \n [Jungfrau] bottom half \n [Gotthard2] veto debugging "
"\n");
INTEGER_COMMAND(udp_dstport, getDestinationUDPPort, setDestinationUDPPort,
StringTo<int>,
"[n]\n\tPort number of the receiver (destination) udp "
"interface. Default is 50001.");
"slsReceiver). \n\t [Jungfrau] bottom half \n\t [Gotthard2] veto "
"debugging.");
INTEGER_COMMAND(
udp_dstport2, getDestinationUDPPort2, setDestinationUDPPort2,
udp_dstport, getDestinationUDPPort, setDestinationUDPPort,
StringTo<int>,
"[n]\n\tDefault is 50002.\n\t[Jungfrau] Port number of the receiver "
"(destination) udp interface where the second half of detector data is "
"sent to. \n\t[Eiger] Port number of the reciever (desintation) udp "
"interface where the right half of the detector data is sent to.");
"[n]\n\tPort number of the receiver (destination) udp "
"interface. Default is 50001. \n\tIf multi command, ports for each "
"module is calculated (incremented by 1 if no 2nd interface)");
INTEGER_COMMAND(udp_dstport2, getDestinationUDPPort2,
setDestinationUDPPort2, StringTo<int>,
"[n]\n\t[Jungfrau][Eiger][Gotthard2] Port number of the "
"receiver (destination) udp interface 2. Default is 50002. "
"\n\tIf multi command, ports for each module is calculated "
"(incremented by 2) \n\t[Jungfrau] bottom half \n\t[Eiger] "
"right half \n\t[Gotthard2] veto debugging");
EXECUTE_SET_COMMAND(
udp_reconfigure, reconfigureUDPDestination,
@ -1890,7 +1900,7 @@ class CmdProxy {
INTEGER_COMMAND(
zmqport, getClientZmqPort, setClientZmqPort, StringTo<int>,
"[port]\n\tZmq port in client(gui) or intermediate process for data to "
"be streamed to from receiver. efault connects to receiver zmq "
"be streamed to from receiver. Default connects to receiver zmq "
"streaming out port (30001). Modified only when using an intermediate "
"process between receiver and client(gui). Also restarts client zmq "
"streaming if enabled. Must be different for every detector (and udp "
@ -1906,8 +1916,8 @@ class CmdProxy {
INTEGER_COMMAND(
zmqip, getClientZmqIp, setClientZmqIp, IpAddr,
"[x.x.x.x]\n\tZmq IP Address in client(gui) or intermediate process "
"for data to be streamed to from receiver. Default connects to "
"[x.x.x.x]\n\tIp Address to listen to zmq data streamed out from "
"receiver or intermediate process. Default connects to "
"receiver zmq Ip Address (from rx_hostname). Modified only when using "
"an intermediate process between receiver and client(gui). Also "
"restarts client zmq streaming if enabled.");
@ -2082,7 +2092,7 @@ class CmdProxy {
INTEGER_IND_COMMAND(v_limit, getVoltage, setVoltage, StringTo<int>,
defs::V_LIMIT,
"[n_value]\n\t[Ctb][Moench] Soft limit for power "
"supplies(ctb only) and DACS in mV.");
"supplies (ctb only) and DACS in mV.");
INTEGER_COMMAND_HEX(adcenable, getADCEnableMask, setADCEnableMask,
StringTo<uint32_t>,