Topics and Data Types

Topics

Topics are named data channels in DDS. Publishers write to topics, and subscribers read from them.

auto topic = participant->create_topic<MyDataType>(
    "MyTopic",
    TOPIC_QOS_DEFAULT
);

Data Types

Data types are defined using IDL and compiled to C++:

struct MyDataType {
    @key long id;
    string message;
    float value;
};

See the IDL Compiler Guide for details.