1.2. Fast DDS Image
This Docker image contains the Fast DDS library and its dependencies, ready to be used in a final user application. This includes:
eProsima Fast DDS libraries and examples: Fast DDS libraries bundled with several examples that showcase a variety of capabilities of eProsima’s Fast DDS implementation.
To load this image into your Docker repository, from a terminal, run:
docker load -i "ubuntu-fastdds <FastDDS-Version>.tar"
You can run this Docker container as follows:
docker run -it ubuntu-fastdds:<FastDDS-Version>
From the resulting Bash Shell you can run each feature.
1.2.1. Fast DDS Examples
Included in this Docker container is a set of binary examples that showcase several functionalities of the Fast DDS libraries. These examples’ path can be accessed from a terminal by typing:
goToExamples
From this folder, you can access all examples, both for DDS and RTPS layers.
1.2.1.1. Hello World Example
This is a minimal example that will perform a Publisher/Subscriber match and start sending samples.
goToExamples
cd dds/HelloWorldExample/bin
tmux new-session "./DDSHelloWorldExample publisher 0 1000" \; \
split-window "./DDSHelloWorldExample subscriber" \; \
select-layout even-vertical
This example is not constrained to the current instance. It’s possible to run several instances of this container to check the communication between them by running the following from each container.
goToExamples
cd dds/HelloWorldExample/bin
./DDSHelloWorldExample publisher
or
goToExamples
cd dds/HelloWorldExample/bin
./DDSHelloWorldExample subscriber
1.2.1.2. Benchmark Example
This example creates either a Publisher or a Subscriber and on a successful match starts sending samples. After a few seconds the process that launched the Publisher will show a report with the number of samples transmitted.
On the subscriber side, run:
goToExamples
cd dds/Benchmark/bin
./DDSBenchmark subscriber udp
On the publisher side, run:
goToExamples
cd dds/Benchmark/bin
./DDSBenchmark publisher udp