Class OpenSkyhawk::FaultSource
ClassList > OpenSkyhawk > FaultSource
A source of node faults — implemented by any object that can fault (#163). More...
#include <NodeStatus.h>
Inherited by the following classes: OpenSkyhawk::DrumDisplay
Public Functions
| Type | Name |
|---|---|
| virtual NodeFaultCode | faultCode () const Current fault code ( NodeFaultCode::NONE when healthy). Cheap/const, cached state only. |
| virtual const char * | faultDetail () const Human-readable fault detail for the local DiagSerial tap only — never on the wire. |
| FaultSource * | next () const Next fault source; nullptr at end. |
Public Static Functions
| Type | Name |
|---|---|
| FaultSource * | head () Head of the self-registered fault-source list. |
Protected Functions
| Type | Name |
|---|---|
| FaultSource () Registers this instance into the list. |
|
| ~FaultSource () = default Protected, non-virtual: a base/mixin, never deleted through this type. |
Detailed Description
Self-registers into a static list at construction; a node-level aggregator walks FaultSource::head() to decide node health, pick the primary faultCode() for HEALTH_n, and print faultDetail() to DiagSerial. Implementers report cached state only — cheap, const, no blocking I/O — since the aggregator runs on the periodic health path. Examples: DrumDisplay (I2C), a PDU rail monitor (over/under-voltage/short), a PanelBridge host-link watchdog.
Note:
Lifetime: a FaultSource must have static/global lifetime (same rule as OutputBase / InputBase). Registration is permanent — there is no unregister — so a stack/local FaultSource would leave a dangling pointer in the registry the aggregator walks. Construct fault sources as globals (or members of a global object), never on the stack.
Public Functions Documentation
function faultCode
Current fault code ( NodeFaultCode::NONE when healthy). Cheap/const, cached state only.
inline virtual NodeFaultCode OpenSkyhawk::FaultSource::faultCode () const
function faultDetail
Human-readable fault detail for the local DiagSerial tap only — never on the wire.
inline virtual const char * OpenSkyhawk::FaultSource::faultDetail () const
function next
Next fault source; nullptr at end.
FaultSource * OpenSkyhawk::FaultSource::next () const
Public Static Functions Documentation
function head
Head of the self-registered fault-source list.
static FaultSource * OpenSkyhawk::FaultSource::head ()
Protected Functions Documentation
function FaultSource
Registers this instance into the list.
OpenSkyhawk::FaultSource::FaultSource ()
function ~FaultSource
Protected, non-virtual: a base/mixin, never deleted through this type.
OpenSkyhawk::FaultSource::~FaultSource () = default
The documentation for this class was generated from the following file Firmware/Libraries/NodeStatus/NodeStatus.h