Class DdsTimepointBuffer¶
Defined in File DdsTimepointBuffer.hpp
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.
Note
This class is not currently exposed as a QML element, but rather used by DdsBuffer.
Public Functions
-
explicit DdsTimepointBuffer(QObject *parent = nullptr)¶
Constructor.
The initialization is deferred to an init() function.
- Parameters
parent – [in] QObject pointer.
-
virtual ~DdsTimepointBuffer()¶
Destructor.
-
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.
Note
the time points are stored as int64_t.
- Returns
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().
- Parameters
min – [in] New minimum time point value.
max – [in] New maximum time point value.
Signals
-
void rangeTminChanged(QDateTime min)¶
Signal to indicate that minimum time point has changed.
- Parameters
min – [out] Minimum time point as a QDateTime.
-
void rangeTmaxChanged(QDateTime max)¶
Signal to indicate that maximum time point has changed.
- Parameters
max – [out] Maximum time point as a QDateTime.
-
void rangeChanged()¶
Signal to indicate that time range has changed.
-
explicit DdsTimepointBuffer(QObject *parent = nullptr)¶