Micro-XRCE-DDS-Client/examples/Deployment
Ricardo González bb23a278fc
Increase cmake minimum required (#335)
* Refs #16427. Increase cmake minimum required

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #16427. Update googletest

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Fix tests

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Fix tests

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
2022-12-08 11:54:19 +01:00
..
CMakeLists.txt examples: explicitly set language to C (#257) 2021-07-06 07:56:21 +02:00
HelloWorld.c Update Quality Level 1 (#210) 2021-03-23 12:16:24 +01:00
HelloWorld.h Update Quality Level 1 (#210) 2021-03-23 12:16:24 +01:00
HelloWorld.idl #3258. Deployment example strucuture. 2018-08-07 09:59:24 +02:00
README.md Add best effort examples and remove client.config references (#197) 2021-02-23 08:29:13 +01:00
configurator_client.c Increase cmake minimum required (#335) 2022-12-08 11:54:19 +01:00
publisher.c Update Quality Level 1 (#210) 2021-03-23 12:16:24 +01:00
subscriber.c Update Quality Level 1 (#210) 2021-03-23 12:16:24 +01:00

README.md

Deployment example

This example will show how deploy a real world Micro XRCE-DDS configuration. The goal of this example is to create a minimal publisher and subscriber that can send and receive topics from DDS world. To archive this minimal examples, it is necessary to split some logic. This implies that the publisher and subscriber will be configured previously with another application: the configurator client. The configurator client will create the necessary entities in the agent for a specific session. In order to compile this example, the following profiles should be enabled:

  • UCLIENT_PROFILE_UDP

Usage

  1. Run an agent in a certain port, for example, 2018: MicroXRCEAgent udp4 -p 2018.

  2. Run the ConfiguratorClient example to create both, a publisher and a subscriber.

    1. Configure the publisher: ConfiguratorClient --key 1000 create pub --id 1. This will create a publisher with the session key 1000, all necessary entities to create the publisher will have 1 as id.
    2. Configure the subscriber: ConfiguratorClient --key 2000 create sub --id 1. This will create a subscriber with the session key 2000, all necessary entities to create the subscriber will have 1 as id.
  3. Run the Publisher example: PublisherClient --key 1000 --id 1. The publisher will use the configuration for key 1000 and will publish by the DataWriter entity 1.

  4. Run the Subscriber example: SubscriberClient --key 2000 --id 1. The subscriber will use the configuration for key 2000 and will subscribe by the DataReader entity 1.

Topic

The HelloWorld topic has the following IDL representation:

struct HelloWorld
{
	unsigned long index;
	string message;
};