Dev/zmq stream all ipv6 adn remove rx_zmqip (#958)

* enable ipv6 in zmq socket

* removed rx_zmqip API and field in gui, changed client updaterxrzip to updateclientzmqip to have the rx_hostname ip if 0. 

* updated command line for rx_zmqip to give a warning. 

* Replaced 'depreciated' to 'deprecated' everywhere

* switching from * to 0.0.0.0 works for rebinding zmq sockets

* fixed help in command line for rx_zmqip * to 0.0.0.0 and removed cmd in python

* remove publisher zmq socket ip also for moench post processing

* fixed tests

* publisher zmq ip macros to be reused
This commit is contained in:
2024-09-10 15:19:08 +02:00
committed by GitHub
parent 15e8c0d9f1
commit e848293916
35 changed files with 168 additions and 426 deletions

View File

@ -192,12 +192,12 @@ TEST_CASE("Caller::patloop", "[.cmdcall]") {
std::string sLoop = ToString(iLoop);
if (iLoop < 3) {
std::string deprecatedCmd = "patloop" + sLoop;
{ // depreciated
{ // deprecated
std::ostringstream oss;
caller.call(deprecatedCmd, {"0x20", "0x5c"}, -1, PUT, oss);
REQUIRE(oss.str() == deprecatedCmd + " [0x0020, 0x005c]\n");
}
{ // depreciated
{ // deprecated
std::ostringstream oss;
caller.call(deprecatedCmd, {}, -1, GET, oss);
REQUIRE(oss.str() == deprecatedCmd + " [0x0020, 0x005c]\n");
@ -241,12 +241,12 @@ TEST_CASE("Caller::patnloop", "[.cmdcall]") {
std::string sLoop = ToString(iLoop);
if (iLoop < 3) {
std::string deprecatedCmd = "patnloop" + sLoop;
{ // depreciated
{ // deprecated
std::ostringstream oss;
caller.call(deprecatedCmd, {"5"}, -1, PUT, oss);
REQUIRE(oss.str() == deprecatedCmd + " 5\n");
}
{ // depreciated
{ // deprecated
std::ostringstream oss;
caller.call(deprecatedCmd, {}, -1, GET, oss);
REQUIRE(oss.str() == deprecatedCmd + " 5\n");
@ -287,12 +287,12 @@ TEST_CASE("Caller::patwait", "[.cmdcall]") {
std::string sLoop = ToString(iLoop);
if (iLoop < 3) {
std::string deprecatedCmd = "patwait" + sLoop;
{ // depreciated
{ // deprecated
std::ostringstream oss;
caller.call(deprecatedCmd, {"0x5c"}, -1, PUT, oss);
REQUIRE(oss.str() == deprecatedCmd + " 0x005c\n");
}
{ // depreciated
{ // deprecated
std::ostringstream oss;
caller.call(deprecatedCmd, {}, -1, GET, oss);
REQUIRE(oss.str() == deprecatedCmd + " 0x005c\n");
@ -333,12 +333,12 @@ TEST_CASE("Caller::patwaittime", "[.cmdcall]") {
std::string sLoop = ToString(iLoop);
if (iLoop < 3) {
std::string deprecatedCmd = "patwaittime" + sLoop;
{ // depreciated
{ // deprecated
std::ostringstream oss;
caller.call(deprecatedCmd, {"8589936640"}, -1, PUT, oss);
REQUIRE(oss.str() == deprecatedCmd + " 8589936640\n");
}
{ // depreciated
{ // deprecated
std::ostringstream oss;
caller.call(deprecatedCmd, {}, -1, GET, oss);
REQUIRE(oss.str() == deprecatedCmd + " 8589936640\n");

View File

@ -861,26 +861,6 @@ TEST_CASE("Caller::rx_zmqport", "[.cmdcall][.rx]") {
}
}
TEST_CASE("Caller::rx_zmqip", "[.cmdcall][.rx]") {
Detector det;
Caller caller(&det);
auto prev_val = det.getRxZmqIP();
{
std::ostringstream oss;
caller.call("rx_zmqip", {"127.0.0.1"}, 0, PUT, oss);
REQUIRE(oss.str() == "rx_zmqip 127.0.0.1\n");
std::cout << "ZMQIP: " << det.getRxZmqIP() << '\n';
}
{
std::ostringstream oss;
caller.call("rx_zmqip", {}, 0, GET, oss);
REQUIRE(oss.str() == "rx_zmqip 127.0.0.1\n");
}
for (int i = 0; i != det.size(); ++i) {
det.setRxZmqIP(prev_val[i], {i});
}
}
TEST_CASE("Caller::rx_zmqhwm", "[.cmdcall]") {
Detector det;
Caller caller(&det);

View File

@ -3083,7 +3083,7 @@ TEST_CASE("CALLER::zmqip", "[.cmdcall]") {
REQUIRE(oss2.str() == "zmqip " + zmqip[0].str() + '\n');
for (int i = 0; i != det.size(); ++i) {
det.setRxZmqIP(zmqip[i], {i});
det.setClientZmqIp(zmqip[i], {i});
}
}