mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
add debug output to test devices
This commit is contained in:
parent
218af15bbb
commit
ee0d2e0c55
|
@ -34,7 +34,11 @@ class Pub : public FairMQDevice
|
||||||
|
|
||||||
auto msg = FairMQMessagePtr{NewMessage()};
|
auto msg = FairMQMessagePtr{NewMessage()};
|
||||||
auto d1 = Send(msg, "data");
|
auto d1 = Send(msg, "data");
|
||||||
if (d1 < 0)
|
if (d1 >= 0)
|
||||||
|
{
|
||||||
|
LOG(INFO) << "Sent data: d1 = " << d1;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
LOG(ERROR) << "Failed sending data: d1 = " << d1;
|
LOG(ERROR) << "Failed sending data: d1 = " << d1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,13 +28,19 @@ class Sub : public FairMQDevice
|
||||||
auto r1 = Send(ready, "control");
|
auto r1 = Send(ready, "control");
|
||||||
if (r1 >= 0)
|
if (r1 >= 0)
|
||||||
{
|
{
|
||||||
|
LOG(INFO) << "Sent first control signal";
|
||||||
auto msg = FairMQMessagePtr{NewMessage()};
|
auto msg = FairMQMessagePtr{NewMessage()};
|
||||||
auto d1 = Receive(msg, "data");
|
auto d1 = Receive(msg, "data");
|
||||||
if (d1 >= 0)
|
if (d1 >= 0)
|
||||||
{
|
{
|
||||||
|
LOG(INFO) << "Received data";
|
||||||
auto ack = FairMQMessagePtr{NewMessage()};
|
auto ack = FairMQMessagePtr{NewMessage()};
|
||||||
auto a1 = Send(ack, "control");
|
auto a1 = Send(ack, "control");
|
||||||
if (a1 < 0)
|
if (a1 >= 0)
|
||||||
|
{
|
||||||
|
LOG(INFO) << "Sent second control signal";
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
LOG(ERROR) << "Failed sending ack signal: a1 = " << a1;
|
LOG(ERROR) << "Failed sending ack signal: a1 = " << a1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user