Class DdsBitPublisher

Inheritance Relationships

Base Type

  • public QObject

Class Documentation

class DdsBitPublisher : public QObject

Publisher for DDS type Bit as a QML element.

This class is a QML element and enables QML applications to publish a DDS signal type from a writable QML property.

Public Functions

explicit DdsBitPublisher(QObject *parent = nullptr)


The initialization is deferred to an init() function.


parent[in] QObject pointer.

virtual ~DdsBitPublisher()


bool signal() const

Signaling bit value as QML property.


bit value as bool.

void init(QtToDds *dds, const QString &topic, bool start_value, bool send_first)

Initializes DDS writer and sets initial value.

  • dds[in] Pointer to QtToDds instance.

  • topic[in] Name of DDS topic to publish.

  • start_value[in] Initial value of the signal.

  • send_first[in] Whether to forcefully send the initial value.

Public Slots

void setSignal(bool value)

Write function for the QML property, publishes value on DDS.

This slot publishes the bit value onto the DDS topic. It also emits a signalChanged().


It only publishes or emits a signal if the QML property value has changed!


value[in] New bool value.

void publish()

Publish on DDS the value already set.


void signalChanged(bool value)

DDS value has has changed.

This signal is connected to the QML DdsBitPublisher::signal property.


value[out] New bit value.


bool signal

DDS Bit as bool QML property.

Private Members

std::unique_ptr<sinspekto::Writer<fkin::Bit>> m_writer

The DDS writer wrapper class.