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.

Returns

boolean whether DDS is initialized.

QtToDds(QObject *parent = nullptr)

Constructor.

The initialization is deferred to an init() function.

Parameters

parent[in] QObject pointer.

virtual ~QtToDds()

Destructor.

void init(int domain)

Initializes DDS instance for the given domain.

Parameters

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.

Signals

void initializedChanged(bool ready)

DDS initialized state has has changed.

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

Parameters

ready[out] Is DDS initialized?

Properties

bool initialized

Indicator whether QtToDds has been initialized.

Private Members

bool m_ready

Holds the property on whether DDS is ready.