![]() * Add BigHelloWorld example Signed-off-by: Pablo Garrido <pablogs9@gmail.com> * Fix printf Signed-off-by: Pablo Garrido <pablogs9@gmail.com> * Fix windows * Fix warning Signed-off-by: Pablo Garrido <pablogs9@gmail.com> --------- Signed-off-by: Pablo Garrido <pablogs9@gmail.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
HelloWorld.c | ||
HelloWorld.h | ||
HelloWorld.idl | ||
README.md | ||
main.c |
README.md
SubscribeHelloWorld example
This example will show how to receive data from the DDS World creating a client subscriber. In order to compile this example, the following profiles should be enabled:
UCLIENT_PROFILE_UDP
Usage
- Run an agent in a certain port, for example, 2018:
MicroXRCEAgent udp4 -p 2018
. - Run the PublisherHelloWorld example or some publisher that can send the HelloWorld topic.
- Run the SubscriberHelloWorld example. The example expects first and second argument to be IP address and port where the Micro XRCE-DDS Agent is running. It can also be parameterized with the amount of times that the topic will be listened. If no number is given, the publisher will publish indefinitely.
Topic
The HelloWorld topic has the following IDL representation:
struct HelloWorld
{
unsigned long index;
string message;
};