HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
VortexBootReport Class Reference

#include <VortexBootReport.h>

Collaboration diagram for VortexBootReport:
[legend]

Public Member Functions

void Clear () noexcept
 Forget every entry (start of a new initialisation attempt).
 
bool AddFailed (const char *component) noexcept
 Record a component that failed to initialise.
 
bool AddWarning (const char *text) noexcept
 Record a warning (a degraded subsystem or an unusual condition that did not fail init).
 
size_t FailedCount () const noexcept
 
size_t WarningCount () const noexcept
 
size_t Dropped () const noexcept
 
const char * Failed (size_t i) const noexcept
 
const char * Warning (size_t i) const noexcept
 
size_t CopyFailed (const char *out[], size_t max) const noexcept
 Copy up to max failed-component names into out.
 
size_t CopyWarnings (const char *out[], size_t max) const noexcept
 Copy up to max warnings into out.
 

Static Public Attributes

static constexpr size_t kCapacity = 12
 Capacity of each list (one entry per manager is enough for failures).
 

Private Types

using List = std::array< const char *, kCapacity >
 

Private Member Functions

bool Add (List &list, size_t &count, const char *text) noexcept
 

Static Private Member Functions

static size_t Copy (const List &list, size_t count, const char *out[], size_t max) noexcept
 

Private Attributes

List failed_ {}
 
List warnings_ {}
 
size_t failed_count_ {0}
 
size_t warning_count_ {0}
 
size_t dropped_ {0}
 

Member Typedef Documentation

◆ List

using VortexBootReport::List = std::array<const char*, kCapacity>
private

Member Function Documentation

◆ Add()

bool VortexBootReport::Add ( List &  list,
size_t &  count,
const char *  text 
)
inlineprivatenoexcept
Here is the caller graph for this function:

◆ AddFailed()

bool VortexBootReport::AddFailed ( const char *  component)
inlinenoexcept

Record a component that failed to initialise.

Parameters
componentString literal naming the component, e.g. "MotorController".
Returns
true if recorded or already present; false if the list is full (counted in Dropped()).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddWarning()

bool VortexBootReport::AddWarning ( const char *  text)
inlinenoexcept

Record a warning (a degraded subsystem or an unusual condition that did not fail init).

Parameters
textString literal with static storage.
Returns
true if recorded or already present; false if the list is full (counted in Dropped()).
Here is the call graph for this function:

◆ Clear()

void VortexBootReport::Clear ( )
inlinenoexcept

Forget every entry (start of a new initialisation attempt).

Here is the caller graph for this function:

◆ Copy()

static size_t VortexBootReport::Copy ( const List &  list,
size_t  count,
const char *  out[],
size_t  max 
)
inlinestaticprivatenoexcept
Here is the caller graph for this function:

◆ CopyFailed()

size_t VortexBootReport::CopyFailed ( const char *  out[],
size_t  max 
) const
inlinenoexcept

Copy up to max failed-component names into out.

Returns
number copied.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyWarnings()

size_t VortexBootReport::CopyWarnings ( const char *  out[],
size_t  max 
) const
inlinenoexcept

Copy up to max warnings into out.

Returns
number copied.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dropped()

size_t VortexBootReport::Dropped ( ) const
inlinenoexcept

◆ Failed()

const char * VortexBootReport::Failed ( size_t  i) const
inlinenoexcept
Here is the caller graph for this function:

◆ FailedCount()

size_t VortexBootReport::FailedCount ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ Warning()

const char * VortexBootReport::Warning ( size_t  i) const
inlinenoexcept

◆ WarningCount()

size_t VortexBootReport::WarningCount ( ) const
inlinenoexcept

Member Data Documentation

◆ dropped_

size_t VortexBootReport::dropped_ {0}
private

◆ failed_

List VortexBootReport::failed_ {}
private

◆ failed_count_

size_t VortexBootReport::failed_count_ {0}
private

◆ kCapacity

constexpr size_t VortexBootReport::kCapacity = 12
staticconstexpr

Capacity of each list (one entry per manager is enough for failures).

◆ warning_count_

size_t VortexBootReport::warning_count_ {0}
private

◆ warnings_

List VortexBootReport::warnings_ {}
private

The documentation for this class was generated from the following file: