14#ifndef VORTEX_DIAGNOSTICS_H_
15#define VORTEX_DIAGNOSTICS_H_
50 default:
return "Unknown";
68 std::array<ManagerDiagnostics, kVortexManagerCount>
managers{};
ManagerError
The shared error catalog (manager lane).
Definition VortexDiagnostics.h:25
@ DependencyNotReady
A manager or bus it needs is not up.
@ HardwareFault
The device reported a fault, or a read returned an error code.
@ InvalidParameter
Out-of-range index or argument.
@ InitFailed
Bring-up of a device failed (bootloader, sensor reset, ...)
@ BusUnavailable
No usable bus (SPI / I2C / UART / CAN) or the binding refused it.
@ Unknown
A code the facade does not map.
@ NotInitialized
The manager is not up (never initialised, shut down, or failed)
@ DeviceNotFound
No device at the slot, address or name.
@ CommunicationFailed
A transfer failed (NACK, CRC, timeout)
constexpr const char * ManagerErrorToString(ManagerError e) noexcept
Short text for a ManagerError.
Definition VortexDiagnostics.h:39
constexpr size_t kVortexManagerCount
Number of managers the facade owns (NVS, comms, GPIO, LEDs, motors, ADC, IMU, encoders,...
Definition VortexDiagnostics.h:22
One manager's state in the aggregated snapshot.
Definition VortexDiagnostics.h:55
bool required
true if EnsureInitialized() fails without it
Definition VortexDiagnostics.h:57
const char * name
Manager name (string literal)
Definition VortexDiagnostics.h:56
ManagerError error
Definition VortexDiagnostics.h:59
bool initialized
The manager reports IsInitialized()
Definition VortexDiagnostics.h:58
uint8_t raw_error
The manager's own last-error code.
Definition VortexDiagnostics.h:60
Aggregated board health (Vortex::CollectDiagnostics()). Index order of managers = init order.
Definition VortexDiagnostics.h:64
uint16_t gpio_pins
Pins registered in GpioManager.
Definition VortexDiagnostics.h:77
std::array< ManagerDiagnostics, kVortexManagerCount > managers
Definition VortexDiagnostics.h:68
bool initialized
Vortex::IsInitialized()
Definition VortexDiagnostics.h:65
uint32_t init_time_ms
Definition VortexDiagnostics.h:88
uint8_t motor_devices_ready
... whose bring-up succeeded
Definition VortexDiagnostics.h:79
uint8_t failed_components
Definition VortexDiagnostics.h:86
uint8_t adc_channels
Definition VortexDiagnostics.h:82
bool can_ok
Definition VortexDiagnostics.h:74
bool uart_ok
Definition VortexDiagnostics.h:73
uint8_t managers_up
Managers that report initialised.
Definition VortexDiagnostics.h:67
bool i2c_ok
Definition VortexDiagnostics.h:72
uint8_t temperature_sensors
Definition VortexDiagnostics.h:83
uint8_t imu_devices_ready
Definition VortexDiagnostics.h:80
ManagerError last_error
Why the last EnsureInitialized() failed, if it did.
Definition VortexDiagnostics.h:66
uint8_t encoder_devices_ready
Definition VortexDiagnostics.h:81
bool spi_ok
Definition VortexDiagnostics.h:71
uint8_t motor_devices_active
TMC9660 slots with a handler.
Definition VortexDiagnostics.h:78
uint8_t warnings
Definition VortexDiagnostics.h:87