Struct QtToDds

Inheritance Relationships

Base Type

  • public QObject

Struct Documentation

struct QtToDds : public QObject

Core Qt to DDS instance class.

This class is an essential QML element that holds a DDS wrapper class, with instances of dds::domain::DomainParticipant, dds::sub::Subscriber, and dds::pub::Publisher. These are classes from the DDS API, which enables DDS communication.

Every QML application that intents to communicate with DDS using sinspekto must add this component and initalize it before adding any sinspekto DDS adapters, see the minimal example.

Public Functions

bool initialized() const

Access function used by QML property.


boolean whether DDS is initialized.

QtToDds(QObject *parent = nullptr)


The initialization is deferred to an init() function.


parent[in] QObject pointer.

virtual ~QtToDds()


void init(int domain)

Initializes DDS instance for the given domain.


domain[in] The DDS domain for which to enlist.

Public Members

std::unique_ptr<Dds> dds

Dds functionality not defined here. QtToDds::Dds.

Opaque pointer to QtToDds::Dds.


void initializedChanged(bool ready)

DDS initialized state has has changed.

This signal is connected to the QML QtToDds::initialized property.


ready[out] Is DDS initialized?


bool initialized

Indicator whether QtToDds has been initialized.

Private Members

bool m_ready

Holds the property on whether DDS is ready.