CoreDX DDS Modern C++ API
Topic Use Cases

Create a Topic

Create a Topic with all default QoS policies and no listener.

The type name used for the Topic type is not specified, so the default is 'foo::ExampleType'. Note that the registration of the data type (an explicit operation required in the older C++ API) is handled implicitly.

#include <dds/domain/ddsdomain.hpp>
#include <dds/topic/ddstopic.hpp>
#include "foo.hh" // declares the foo types used in the examples
dds::topic::Topic<foo::ExampleType> topic( participant, "ExampleTopic" );

Similar, but the type name used for the Topic type is specified as 'ExampleType'. [The type 'foo::ExampleType' is implicitly registered with the type name 'ExampleType'.]

dds::topic::Topic<foo::ExampleType> topic( participant, "ExampleTopic", "ExampleType" );

Create a Topic with modified QoS policies and no listener.

Create a Topic with modified QoS policies and a listener.

ExampleTopicListener : public dds::topic::NoOpTopicListener { ... };
ExampleTopicListener * topicListener = new ExampleTopicListener();
topic( participant, "ExampleTopic", qos,

Find a local Topic


© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.