3.1. Define a Data Type

To distribute data using Connext DDS Micro, you must first define a data type, then run the rtiddsgen utility. This utility will generate the type-specific support code that Connext DDS Micro needs and the code that makes calls to publish and subscribe to that data type.

Connext DDS Micro accepts types definitions in Interface Definition Language (IDL) format.

For instance, the HelloWorld examples provided with Connext DDS Micro use this simple type, which contains a string “msg” with a maximum length of 128 chars:

struct HelloWorld
{
    string<128> msg;
};

For more details, see Data Types in the User’s Manual.