diff --git a/examples/MQ/3-dds/CMakeLists.txt b/examples/MQ/3-dds/CMakeLists.txt index 81a829e6..75d5bebc 100644 --- a/examples/MQ/3-dds/CMakeLists.txt +++ b/examples/MQ/3-dds/CMakeLists.txt @@ -76,10 +76,10 @@ GENERATE_LIBRARY() Set(Exe_Names ${Exe_Names} - ex3-sampler-dds - ex3-processor-dds - ex3-sink-dds - ex3-dds-command-ui + ex3-sampler + ex3-processor + ex3-sink + ex3-command-ui ) Set(Exe_Source diff --git a/examples/MQ/3-dds/ex3-dds-topology.xml b/examples/MQ/3-dds/ex3-dds-topology.xml index 183062e5..4ec6ec7e 100644 --- a/examples/MQ/3-dds/ex3-dds-topology.xml +++ b/examples/MQ/3-dds/ex3-dds-topology.xml @@ -1,7 +1,7 @@ - - + + @@ -16,27 +16,27 @@ - @CMAKE_BINARY_DIR@/bin/ex3-sampler-dds --id sampler0 --log-color-format false + @CMAKE_BINARY_DIR@/bin/ex3-sampler --id sampler0 --log-color false SamplerWorker - SamplerOutputAddress + SamplerAddress - @CMAKE_BINARY_DIR@/bin/ex3-processor-dds --id processor%taskIndex% --log-color-format false + @CMAKE_BINARY_DIR@/bin/ex3-processor --id processor%taskIndex% --log-color false ProcessorWorker - SamplerOutputAddress - SinkInputAddress + SamplerAddress + SinkAddress - @CMAKE_BINARY_DIR@/bin/ex3-sink-dds --id sink0 --log-color-format false + @CMAKE_BINARY_DIR@/bin/ex3-sink --id sink0 --log-color false SinkWorker - SinkInputAddress + SinkAddress diff --git a/examples/MQ/3-dds/runExample3Processor.cxx b/examples/MQ/3-dds/runExample3Processor.cxx index 1226b071..c1fd272f 100644 --- a/examples/MQ/3-dds/runExample3Processor.cxx +++ b/examples/MQ/3-dds/runExample3Processor.cxx @@ -84,12 +84,12 @@ int main(int argc, char** argv) LOG(INFO) << "Subscribing and waiting for sampler output address."; ddsKeyValue.subscribe([&keyCondition](const string& /*_key*/, const string& /*_value*/) { keyCondition.notify_all(); }); - ddsKeyValue.getValues("SamplerOutputAddress", &samplerValues); + ddsKeyValue.getValues("SamplerAddress", &samplerValues); while (samplerValues.empty()) { unique_lock lock(keyMutex); keyCondition.wait_until(lock, chrono::system_clock::now() + chrono::milliseconds(1000)); - ddsKeyValue.getValues("SamplerOutputAddress", &samplerValues); + ddsKeyValue.getValues("SamplerAddress", &samplerValues); } } // Sink properties @@ -100,12 +100,12 @@ int main(int argc, char** argv) LOG(INFO) << "Subscribing and waiting for sink input address."; ddsKeyValue.subscribe([&keyCondition](const string& /*_key*/, const string& /*_value*/) { keyCondition.notify_all(); }); - ddsKeyValue.getValues("SinkInputAddress", &sinkValues); + ddsKeyValue.getValues("SinkAddress", &sinkValues); while (sinkValues.empty()) { unique_lock lock(keyMutex); keyCondition.wait_until(lock, chrono::system_clock::now() + chrono::milliseconds(1000)); - ddsKeyValue.getValues("SinkInputAddress", &sinkValues); + ddsKeyValue.getValues("SinkAddress", &sinkValues); } } @@ -123,7 +123,7 @@ int main(int argc, char** argv) // Subscribe on custom commands ddsCustomCmd.subscribeCmd([&](const string& command, const string& condition, uint64_t senderId) { - LOG(INFO) << "Received custom command: " << command << " condition: " << condition << " senderId: " << senderId; + LOG(INFO) << "Received custom command: " << command; if (command == "check-state") { ddsCustomCmd.sendCmd(id + ": " + processor.GetCurrentStateName(), to_string(senderId)); diff --git a/examples/MQ/3-dds/runExample3Sampler.cxx b/examples/MQ/3-dds/runExample3Sampler.cxx index ce408060..a61a4d94 100644 --- a/examples/MQ/3-dds/runExample3Sampler.cxx +++ b/examples/MQ/3-dds/runExample3Sampler.cxx @@ -105,7 +105,7 @@ int main(int argc, char** argv) // Advertise the bound addresses via DDS property LOG(INFO) << "Giving sampler output address to DDS."; dds::key_value::CKeyValue ddsKeyValue; - ddsKeyValue.putValue("SamplerOutputAddress", sampler.fChannels.at("data-out").at(0).GetAddress()); + ddsKeyValue.putValue("SamplerAddress", sampler.fChannels.at("data-out").at(0).GetAddress()); sampler.WaitForEndOfState("INIT_DEVICE"); @@ -117,7 +117,7 @@ int main(int argc, char** argv) // Subscribe on custom commands ddsCustomCmd.subscribeCmd([&](const string& command, const string& condition, uint64_t senderId) { - LOG(INFO) << "Received custom command: " << command << " condition: " << condition << " senderId: " << senderId; + LOG(INFO) << "Received custom command: " << command; if (command == "check-state") { ddsCustomCmd.sendCmd(id + ": " + sampler.GetCurrentStateName(), to_string(senderId)); diff --git a/examples/MQ/3-dds/runExample3Sink.cxx b/examples/MQ/3-dds/runExample3Sink.cxx index f7380d1b..752d5973 100644 --- a/examples/MQ/3-dds/runExample3Sink.cxx +++ b/examples/MQ/3-dds/runExample3Sink.cxx @@ -105,7 +105,7 @@ int main(int argc, char** argv) // Advertise the bound address via DDS property LOG(INFO) << "Giving sink input address to DDS."; dds::key_value::CKeyValue ddsKeyValue; - ddsKeyValue.putValue("SinkInputAddress", sink.fChannels.at("data-in").at(0).GetAddress()); + ddsKeyValue.putValue("SinkAddress", sink.fChannels.at("data-in").at(0).GetAddress()); sink.WaitForEndOfState("INIT_DEVICE"); @@ -117,7 +117,7 @@ int main(int argc, char** argv) // Subscribe on custom commands ddsCustomCmd.subscribeCmd([&](const string& command, const string& condition, uint64_t senderId) { - LOG(INFO) << "Received custom command: " << command << " condition: " << condition << " senderId: " << senderId; + LOG(INFO) << "Received custom command: " << command; if (command == "check-state") { ddsCustomCmd.sendCmd(id + ": " + sink.GetCurrentStateName(), to_string(senderId));