From 7f0237d97d6de6912963cdbc02a6cdef4d6a37f2 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Tue, 13 Aug 2019 19:03:47 +0200 Subject: [PATCH] Example.DDS: Support DDS 2.5.25+ CLI --- examples/dds/CMakeLists.txt | 6 ++++++ examples/dds/fairmq-start-ex-dds.sh.in | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/dds/CMakeLists.txt b/examples/dds/CMakeLists.txt index d8b08990..675e4ed9 100644 --- a/examples/dds/CMakeLists.txt +++ b/examples/dds/CMakeLists.txt @@ -28,6 +28,12 @@ target_link_libraries(fairmq-ex-dds-sink PRIVATE ExampleDDSLib) add_custom_target(ExampleDDS DEPENDS fairmq-ex-dds-sampler fairmq-ex-dds-processor fairmq-ex-dds-sink) +if(DDS_VERSION VERSION_LESS 2.5.25) + set(WAIT_COMMAND "dds-info --wait-for-idle-agents") +else() + set(WAIT_COMMAND "dds-info --idle-count --wait") +endif() + set(BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_BINARY_DIR}/fairmq/plugins/DDS) set(DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ex-dds-topology.xml ${CMAKE_CURRENT_BINARY_DIR}/ex-dds-topology.xml @ONLY) diff --git a/examples/dds/fairmq-start-ex-dds.sh.in b/examples/dds/fairmq-start-ex-dds.sh.in index a210ccff..1025c1c3 100755 --- a/examples/dds/fairmq-start-ex-dds.sh.in +++ b/examples/dds/fairmq-start-ex-dds.sh.in @@ -37,7 +37,7 @@ else dds-submit -r ${plugin} -n ${requiredNofAgents} fi echo "...waiting for ${requiredNofAgents} idle agents..." -dds-info --wait-for-idle-agents ${requiredNofAgents} +@WAIT_COMMAND@ ${requiredNofAgents} topologyFile=@DATA_DIR@/ex-dds-topology.xml echo "TOPOLOGY FILE: ${topologyFile}" @@ -69,7 +69,7 @@ fairmq-dds-command-ui -c t -w "DEVICE READY" -n ${requiredNofAgents} fairmq-dds-command-ui -c d -w "IDLE" -n ${requiredNofAgents} fairmq-dds-command-ui -c q echo "...waiting for ${requiredNofAgents} idle agents..." -dds-info --wait-for-idle-agents ${requiredNofAgents} +@WAIT_COMMAND@ ${requiredNofAgents} echo "------------------------" # TODO Uncomment once DDS 2.6 is released