Two devices can't share device id

This commit is contained in:
Dennis Klein 2017-04-10 17:38:19 +02:00 committed by Mohammad Al-Turany
parent bf2b208749
commit d866589be1
2 changed files with 46 additions and 4 deletions

View File

@ -33,7 +33,7 @@ auto RunPubSub(string transport) -> void
auto sub1 = execute_result{"", 0}; auto sub1 = execute_result{"", 0};
thread sub1_thread([&]() { thread sub1_thread([&]() {
stringstream cmd; stringstream cmd;
cmd << runTestDevice << " --id sub_" << transport << " --control static --verbosity DEBUG " cmd << runTestDevice << " --id sub_1" << transport << " --control static --verbosity DEBUG "
<< "--log-color false --mq-config \"" << mqConfig << "\""; << "--log-color false --mq-config \"" << mqConfig << "\"";
sub1 = execute(cmd.str(), "[SUB1]"); sub1 = execute(cmd.str(), "[SUB1]");
}); });
@ -41,7 +41,7 @@ auto RunPubSub(string transport) -> void
auto sub2 = execute_result{"", 0}; auto sub2 = execute_result{"", 0};
thread sub2_thread([&]() { thread sub2_thread([&]() {
stringstream cmd; stringstream cmd;
cmd << runTestDevice << " --id sub_" << transport << " --control static --verbosity DEBUG " cmd << runTestDevice << " --id sub_2" << transport << " --control static --verbosity DEBUG "
<< "--log-color false --mq-config \"" << mqConfig << "\""; << "--log-color false --mq-config \"" << mqConfig << "\"";
sub2 = execute(cmd.str(), "[SUB2]"); sub2 = execute(cmd.str(), "[SUB2]");
}); });

View File

@ -122,7 +122,7 @@
] ]
}, },
{ {
"id": "sub_zeromq", "id": "sub_1zeromq",
"channels": [ "channels": [
{ {
"address": "tcp://127.0.0.1:5556", "address": "tcp://127.0.0.1:5556",
@ -143,7 +143,49 @@
] ]
}, },
{ {
"id": "sub_nanomsg", "id": "sub_2zeromq",
"channels": [
{
"address": "tcp://127.0.0.1:5556",
"method": "connect",
"name": "data",
"rateLogging": 0,
"transport": "zeromq",
"type": "sub"
},
{
"address": "tcp://127.0.0.1:5555",
"method": "connect",
"name": "control",
"rateLogging": 0,
"transport": "zeromq",
"type": "push"
}
]
},
{
"id": "sub_1nanomsg",
"channels": [
{
"address": "tcp://127.0.0.1:5756",
"method": "connect",
"name": "data",
"rateLogging": 0,
"transport": "nanomsg",
"type": "sub"
},
{
"address": "tcp://127.0.0.1:5755",
"method": "connect",
"name": "control",
"rateLogging": 0,
"transport": "nanomsg",
"type": "push"
}
]
},
{
"id": "sub_2nanomsg",
"channels": [ "channels": [
{ {
"address": "tcp://127.0.0.1:5756", "address": "tcp://127.0.0.1:5756",