Class RatatoskDouble3Publisher

Inheritance Relationships

Base Type

  • public QObject

Class Documentation

class RatatoskDouble3Publisher : public QObject

Publisher for DDS type ratatosk::types::Double3 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 RatatoskDouble3Publisher(QObject *parent = nullptr)


The initialization is deferred to an init() function.


parent[in] QObject pointer.

virtual ~RatatoskDouble3Publisher()


QVector3D value() const

Property accessor for vector as QML property.


QML compatible vector.

void init(QtToDds *dds, const QString &topic, QVector3D 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 setValue(QVector3D value)

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

This slot publishes the vector 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 vector value.

void publish()

Publish on DDS the value already set.


void valueChanged(QVector3D value)

DDS value has has changed.

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


value[out] New vector value.


QVector3D value

DDS 3d-vector as QVector3D QML property.

Private Members

std::unique_ptr<sinspekto::Writer<ratatosk::types::Double3>> m_writer

The DDS writer wrapper class.