|
RTOS Wrapper
API reference
|
Fixed-capacity ring buffer of error / event records. More...
#include <cstddef>#include <cstdint>#include <cstring>#include <mutex>#include <type_traits>#include "RtosMutex.h"Go to the source code of this file.
Classes | |
| class | hf::ErrorHistoryReader< Record > |
| class | hf::ErrorHistoryWriter< Record > |
| class | hf::ErrorHistory< Record, kCapacity > |
Namespaces | |
| namespace | hf |
Fixed-capacity ring buffer of error / event records.
Three types in one header:
hf::ErrorHistoryReader<Record> — pure-virtual read-side ABC.hf::ErrorHistoryWriter<Record> — pure-virtual write-side ABC.hf::ErrorHistory<Record, kCapacity> — concrete impl deriving from both.RtosMutex; safe from any task context. Not ISR-safe — callers from ISR should buffer to a queue and drain from a task. Push returns false if it cannot acquire the mutex.Record[kCapacity]. When the ring is full, Push overwrites the oldest entry and bumps OverwriteCount().Record must be trivially copyable.