template <typename ValueType>

class TimestampedBuffer

Defined at line 87 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 95 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 101 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h

TimestampedBuffer<ValueType> & operator= (TimestampedBuffer<ValueType> && other)

Defined at line 102 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h

void TimestampedBuffer<ValueType> (const TimestampedBuffer<ValueType> & other)

Defined at line 103 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h

TimestampedBuffer<ValueType> & operator= (const TimestampedBuffer<ValueType> & other)

Defined at line 104 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 111 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 152 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h

const ResetInfo & GetResetInfo ()

Defined at line 168 of file ../../sdk/lib/power/state_recorder/cpp/inspect_buffer.h