Class DdsKinematics6DBuffer¶
Defined in File DdsKinematics6DBuffer.hpp
Inheritance Relationships¶
Base Type¶
public DdsBuffer(Class DdsBuffer)
Class Documentation¶
-
class DdsKinematics6DBuffer : public DdsBuffer¶
Buffer class for Kinematics6D or BatchKinematics6D.
This class subscribes to a DDS topic and makes sure the buffers are updated with incoming data.
When updating a QAbstractSeries with DdsBuffer::updateSeries() in QML scripts, the following mapping from DDS member variables to qml_enums::DimId enums are used.
QML enum
Variable
FKIN.Ttime
FKIN.PosXposition.x
FKIN.PosYposition.y
FKIN.PosZposition.z
FKIN.VelXvelocity.x
FKIN.VelYvelocity.y
FKIN.VelZvelocity.z
FKIN.EulerXeuler.x
FKIN.EulerYeuler.y
FKIN.EulerZeuler.z
aBuffer.updateSeries(someSeries, FKIN.T, FKIN.EulerX)
Public Functions
-
explicit DdsKinematics6DBuffer(QObject *parent = nullptr)¶
Constructor.
The initialization of DDS instances are deferred to an init() function, but it initializes the data buffers.
- Parameters
parent – [in] QObject pointer.
-
virtual ~DdsKinematics6DBuffer()¶
Destructor.
-
QPointF rangePosX() const
Property accessor for position x range.
-
QPointF rangePosY() const
Property accessor for position y range.
-
QPointF rangePosZ() const
Property accessor for position z range.
-
QPointF rangeVelX() const
Property accessor for velocity x range.
-
QPointF rangeVelY() const
Property accessor for velocity y range.
-
QPointF rangeVelZ() const
Property accessor for velocity z range.
-
QPointF rangeEulerX() const
Property accessor for euler x range.
-
QPointF rangeEulerY() const
Property accessor for euler y range.
-
QPointF rangeEulerZ() const
Property accessor for euler z range.
-
void init(QtToDds *dds, const QString &topic, const QString &id, int buffer_size, bool use_batch, bool with_listener = true)¶
Initializes DDS reader and connects Qt signals and slots.
Note
An instance of this class can only be buffer for a single DDS topic, so either type Kinematics2D or BatchKinematics2D.
- Parameters
dds – [in] Pointer to QtToDds instance.
topic – [in] Name of DDS topic for which to subscribe.
id – [in] Key identifier for the topic instance.
buffer_size – [in] Number of data points to store in the circular buffer.
use_batch – [in] If true, subscribe to BatchIdVec1d, otherwise IdVec1d.
with_listener – [in] Use DdsReaderListener callback to trigger eventHeard() signal.
Public Slots
Signals
-
void rangeChanged(QPointF range, qml_enums::DimId dim)¶
Triggered when the range has changed.
See class documentation for supported DimId enums.
Note
For time dimension, use DdsBuffer::rangeTminChanged() and DdsBuffer::rangeTmaxChanged().
- Parameters
range – [out] New range for the dimension.
dim – [out] The dimension in question.
-
void eventHeard()¶
DdsReaderListener calls this signal when there is data available on the subscribed topic.
If init() is called with_listener=true, eventHeard() will be connected to the slot updateBuffers().
-
void newData()¶
Signal whenever new data is added to the buffers.
Properties
-
QPointF rangePosX¶
Data range of position x.
-
QPointF rangePosY¶
Data range of position y.
-
QPointF rangePosZ¶
Data range of position z.
-
QPointF rangeVelX¶
Data range of velocity x.
-
QPointF rangeVelY¶
Data range of velocity y.
-
QPointF rangeVelZ¶
Data range of velocity z.
-
QPointF rangeEulerX¶
Data range of euler x.
-
QPointF rangeEulerY¶
Data range of euler y.
-
QPointF rangeEulerZ¶
Data range of euler z.
-
explicit DdsKinematics6DBuffer(QObject *parent = nullptr)¶