template <typename ValueType>
class TimestampedBuffer
Defined at line 86 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
Manages circular buffers for timestamp deltas and associated data.
Public Methods
void TimestampedBuffer<ValueType> (size_t size)
Defined at line 94 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
void TimestampedBuffer<ValueType> (TimestampedBuffer<ValueType> && other)
Delete move and copy constructors until we have a good reason to use them.
Defined at line 100 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
TimestampedBuffer<ValueType> & operator= (TimestampedBuffer<ValueType> && other)
Defined at line 101 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
void TimestampedBuffer<ValueType> (const TimestampedBuffer<ValueType> & other)
Defined at line 102 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
TimestampedBuffer<ValueType> & operator= (const TimestampedBuffer<ValueType> & other)
Defined at line 103 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
void AddEntry (ValueType data, int64_t current_ms)
Adds an entry to the buffer, at millisecond timestamp `current_ms`.
If the millisecond delta between the new timestamp and the most recent timestamp cannot be
represented as an int32_t (approximately 24.9 days), the buffer will be reset, retaining only
the supplied entry.
Defined at line 110 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
void ForEachDataPoint (fit::function<void (const DataPoint<ValueType> &)> callback)
Reconstructs each DataPoint stored in the buffer and runs `callback` on it.
Defined at line 151 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
const ResetInfo & GetResetInfo ()
Defined at line 167 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
size_t GetCount ()
Defined at line 168 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h
size_t GetCapacity ()
Defined at line 169 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h