mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
@ -718,15 +718,17 @@ class Detector {
|
||||
|
||||
void setDestinationUDPList(const UdpDestination, const int module_id);
|
||||
|
||||
/** [Jungfrau][Eiger] */
|
||||
/** [Jungfrau][Eiger][Mythen3][Gotthard2] */
|
||||
Result<int> getNumberofUDPDestinations(Positions pos = {}) const;
|
||||
|
||||
void clearUDPDestinations(Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
/** [Jungfrau][Mythen3][Gotthard2] */
|
||||
Result<int> getFirstUDPDestination(Positions pos = {}) const;
|
||||
|
||||
/**[Jungfrau] Options 0-31 (or number of udp destinations) */
|
||||
/**[Jungfrau][Gotthard2] Options 0-31 (or number of udp destinations)\n
|
||||
* [Mythen3] Options 0-63 (or number of udp destinations)
|
||||
*/
|
||||
void setFirstUDPDestination(const int value, Positions pos = {});
|
||||
|
||||
Result<IpAddr> getDestinationUDPIP(Positions pos = {}) const;
|
||||
|
@ -1519,9 +1519,10 @@ std::string CmdProxy::UDPDestinationList(int action) {
|
||||
"\n\t[mac=xx:xx:xx:xx:xx:xx] "
|
||||
"[(optional)mac2=xx:xx:xx:xx:xx:xx]\n\t[port=value] "
|
||||
"[(optional)port2=value\n\tThe order of ip, mac and port does "
|
||||
"not matter. entry_value can be >0 only for Eiger and Jungfrau "
|
||||
"where round robin is implemented. If 'auto' used, then ip is "
|
||||
"set to ip of rx_hostname."
|
||||
"not matter. entry_value can be >0 only for "
|
||||
"[Eiger][Jungfrau][Mythen3][Gotthard2] where round robin is "
|
||||
"implemented. If 'auto' used, then ip is set to ip of "
|
||||
"rx_hostname."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (!args.empty()) {
|
||||
|
@ -1600,9 +1600,9 @@ class CmdProxy {
|
||||
|
||||
GET_COMMAND(
|
||||
udp_numdst, getNumberofUDPDestinations,
|
||||
"\n\t[Jungfrau][Eiger] One can enter upto 32 "
|
||||
"destinations that the detector will stream images "
|
||||
"out in a round robin fashion. This is get only command. Default: 1");
|
||||
"\n\t[Jungfrau][Eiger][Mythen3][Gotthard2] One can enter upto 32 (64 "
|
||||
"for Mythen3) destinations that the detector will stream images out in "
|
||||
"a round robin fashion. This is get only command. Default: 1");
|
||||
|
||||
EXECUTE_SET_COMMAND(udp_cleardst, clearUDPDestinations,
|
||||
"\n\tClears udp destination details on the detector.");
|
||||
@ -1610,11 +1610,11 @@ class CmdProxy {
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
udp_firstdst, getFirstUDPDestination, setFirstUDPDestination,
|
||||
StringTo<int>,
|
||||
"[0 - 31 (or number of udp destinations)]\n\t[Jungfrau] One can set "
|
||||
"which is the first "
|
||||
"destination that the detector will stream images "
|
||||
"out from in a round robin fashion. The entry must not have been "
|
||||
"empty. Default: 0");
|
||||
"\n[0 - 31 (or number of udp "
|
||||
"destinations)]\n\t[Jungfrau][Gotthard2]\n[0-63]\n\t[Mythen3]\n\n\t "
|
||||
"One can set which is the first destination that the detector will "
|
||||
"stream images out from in a round robin fashion. The entry must not "
|
||||
"have been empty. Default: 0");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
udp_srcmac, getSourceUDPMAC, setSourceUDPMAC, MacAddr,
|
||||
|
@ -2394,7 +2394,8 @@ TEST_CASE("udp_dstlist", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::EIGER) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::EIGER ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) {
|
||||
REQUIRE_NOTHROW(proxy.Call("udp_dstlist", {}, 0, GET, std::cout, 0));
|
||||
REQUIRE_THROWS(proxy.Call(
|
||||
"udp_dstlist", {"ip=0.0.0.0", "mac=00:00:00:00:00:00", "port=1233"},
|
||||
@ -2408,7 +2409,8 @@ TEST_CASE("udp_numdst", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::EIGER) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::EIGER ||
|
||||
det_type == defs::MYTHEN3 || det_type == defs::GOTTHARD2) {
|
||||
REQUIRE_NOTHROW(proxy.Call("udp_numdst", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("udp_numdst", {}, -1, GET));
|
||||
@ -2427,7 +2429,8 @@ TEST_CASE("udp_firstdst", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU || det_type == defs::MYTHEN3 ||
|
||||
det_type == defs::GOTTHARD2) {
|
||||
auto prev_val = det.getFirstUDPDestination();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
Reference in New Issue
Block a user