fixed for virtual servers rr

This commit is contained in:
2021-08-31 11:42:17 +02:00
parent a8d3721812
commit 204a4764b9
7 changed files with 13 additions and 16 deletions

View File

@ -680,7 +680,7 @@ class Detector {
/** [Jungfrau] */
Result<int> getFirstUDPDestination(Positions pos = {}) const;
/**[Jungfrau] Options 0-31 */
/**[Jungfrau] Options 0-31 (or number of udp destinations) */
void setFirstUDPDestination(const int value, Positions pos = {});
Result<IpAddr> getDestinationUDPIP(Positions pos = {}) const;

View File

@ -1543,7 +1543,7 @@ class CmdProxy {
INTEGER_COMMAND_VEC_ID(
udp_firstdst, getFirstUDPDestination, setFirstUDPDestination,
StringTo<int>,
"[0 - 31]\n\t[Jungfrau] One can set which is the first "
"[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");

View File

@ -2266,7 +2266,7 @@ TEST_CASE("udp_firstdst", "[.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) {
auto prev_val = det.getFirstUDPDestination();
{
std::ostringstream oss;
@ -2280,8 +2280,8 @@ TEST_CASE("udp_firstdst", "[.cmd]") {
}
{
std::ostringstream oss;
proxy.Call("udp_firstdst", {"31"}, -1, PUT, oss);
REQUIRE(oss.str() == "udp_firstdst 31\n");
proxy.Call("udp_firstdst", {"1"}, -1, PUT, oss);
REQUIRE(oss.str() == "udp_firstdst 1\n");
}
REQUIRE_THROWS(proxy.Call("udp_firstdst", {"33"}, -1, PUT));