Class DdsIdVec1dPublisher

Inheritance Relationships

Base Type

  • public QObject

Class Documentation

class DdsIdVec1dPublisher : public QObject

Publisher for DDS type IdVec1d 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 DdsIdVec1dPublisher(QObject *parent = nullptr)


The initialization is deferred to an init() function.


parent[in] QObject pointer.

virtual ~DdsIdVec1dPublisher()


double value() const

Property accessor for Real value as QML property.


Real value as double.

void init(QtToDds *dds, const QString &topic, const QString &id, double 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.

  • id[in] Key identifier for the topic instance.

  • start_value[in] Initial value of the signal.

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

Public Slots

void setValue(double value)

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

This slot publishes the double value onto the DDS topic with the configured key identifier. It also emits a valueChanged().


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


value[in] New double value.

void publish()

Publish on DDS the value already set.


void valueChanged(double value)

DDS value has has changed.

This signal is connected to the QML DdsIdVec1dPublisher::value property.


value[out] New Real value.


double value

DDS 1d-vector as double QML property.

Private Members

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

The DDS writer wrapper class.