From ab985dedf88fe73620ef0738f462335dd245b17f Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Thu, 29 Jun 2017 12:28:22 +0200 Subject: [PATCH] Update DDS example to new DDS APIs --- examples/MQ/3-dds/README.md | 17 +++++------------ examples/MQ/3-dds/ex3-dds-topology.xml | 26 ++++++++++++-------------- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/examples/MQ/3-dds/README.md b/examples/MQ/3-dds/README.md index 752425ba..62fe7373 100644 --- a/examples/MQ/3-dds/README.md +++ b/examples/MQ/3-dds/README.md @@ -58,30 +58,23 @@ dds-submit --rms ssh --config ex3-dds-hosts.cfg ``` The `--rms` option defines a destination resource management system. The `--config` specifies an SSH plug-in resource definition file. -##### 6. Set the topology file. - -Point DDS to the topology file: -```bash -dds-topology --set ex3-dds-topology.xml -``` - -##### 7. Activate the topology. +##### 6. Activate the topology. ```bash -dds-topology --activate +dds-topology --activate ex3-dds-topology.xml ``` -##### 8. Run +##### 7. Run After activation, agents will execute the defined tasks on the worker nodes. Output of the tasks will be stored in the directory that was specified in the hosts file. -##### 9. (optional) Use example command UI to check state of the devices +##### 8. (optional) Use example command UI to check state of the devices A simple utility (fairmq-dds-command-ui) is included with FairRoot to send commands to devices and receive replies from them. The utility uses the DDS intercom library to send "check-state" string to all devices, to which they reply with their ID and state they are in. The utility also allows requesting state changes from devices. To let the device listen to the commands from the utility, start the device with `--control ` cmd option (see example XML topology). To see it in action, start the fairmq-dds-command-ui while the topology is running. -##### 10. Stop DDS server/topology. +##### 9. Stop DDS server/topology. The execution of tasks can be stopped with: ```bash diff --git a/examples/MQ/3-dds/ex3-dds-topology.xml b/examples/MQ/3-dds/ex3-dds-topology.xml index 8090724c..ad037efc 100644 --- a/examples/MQ/3-dds/ex3-dds-topology.xml +++ b/examples/MQ/3-dds/ex3-dds-topology.xml @@ -3,21 +3,15 @@ - - - - - - - - - - - + + + @CMAKE_BINARY_DIR@/bin/examples/MQ/3-dds/ex3-sampler --id sampler --log-color false --control libFairMQDDSControlPlugin.so --config libFairMQDDSConfigPlugin.so --mq-config @CMAKE_BINARY_DIR@/bin/config/ex3-dds.json - SamplerWorker + + SamplerWorker + data1 @@ -25,7 +19,9 @@ @CMAKE_BINARY_DIR@/bin/examples/MQ/3-dds/ex3-processor --id processor_%taskIndex% --config-key processor --log-color false --control libFairMQDDSControlPlugin.so --config libFairMQDDSConfigPlugin.so --mq-config @CMAKE_BINARY_DIR@/bin/config/ex3-dds.json - ProcessorWorker + + ProcessorWorker + data1 data2 @@ -34,7 +30,9 @@ @CMAKE_BINARY_DIR@/bin/examples/MQ/3-dds/ex3-sink --id sink --log-color false --control libFairMQDDSControlPlugin.so --config libFairMQDDSConfigPlugin.so --mq-config @CMAKE_BINARY_DIR@/bin/config/ex3-dds.json - SinkWorker + + SinkWorker + data2