Class DdsTimepointBuffer

Inheritance Relationships

Base Type

  • public QObject

Class Documentation

class DdsTimepointBuffer : public QObject

Buffer class for holding time point data in a QML compatible data structure.

QDateTime is the Qt time point data type, which is available in QML and compatible with e.g. QtChart.


This class is not currently exposed as a QML element, but rather used by DdsBuffer.

Public Functions

explicit DdsTimepointBuffer(QObject *parent = nullptr)


The initialization is deferred to an init() function.


parent[in] QObject pointer.

virtual ~DdsTimepointBuffer()


QDateTime rangeTmin() const

Access function for minimum time point in buffer as QML property.

QDateTime rangeTmax() const

Access function for maximum time point in buffer as QML property.

void setCapacity(int buffer_size)

Pre-allocate capacity of the circular buffer.

inline boost::circular_buffer<int64_t> &Buffer()

Access function to the circular buffer that stores the time points.


the time points are stored as int64_t.


Reference to the circular buffer.

Public Slots

void updateRange(QDateTime min, QDateTime max)

Updates the time interval of the buffer.

If provided min or max value is different from already registered range, the function emits rangeTminChanged() and rangeTmaxChanged().

  • min[in] New minimum time point value.

  • max[in] New maximum time point value.


void rangeTminChanged(QDateTime min)

Signal to indicate that minimum time point has changed.


min[out] Minimum time point as a QDateTime.

void rangeTmaxChanged(QDateTime max)

Signal to indicate that maximum time point has changed.


max[out] Maximum time point as a QDateTime.

void rangeChanged()

Signal to indicate that time range has changed.


QDateTime rangeTmin

Minimum time point in buffer.

QDateTime rangeTmax

Maximal time point in buffer.

Private Members

boost::circular_buffer<int64_t> m_buffer

A ring buffer with time points, held as int64_t.

QDateTime m_min_t

Minimum time point value.

QDateTime m_max_t

Maximal time point value.