![]() |
EduArt Sensor Ring Library 4.0.0
|
Unified device state enum covering lifecycle and runtime health. More...
#include <ostream>#include <string>#include "sensorring/platform/SensorringExport.hpp"Go to the source code of this file.
Enumerations | |
| enum class | eduart::sensorring::device::DeviceState { Undefined , Initialized , Idle , Ok , ReceiveError , ProcessError , Error , Shutdown } |
| Unified lifecycle and runtime state of a device. More... | |
Functions | |
| SENSORRING_EXPORT std::string | eduart::sensorring::device::toString (DeviceState state) noexcept |
| Convert a DeviceState value to its string representation. | |
| SENSORRING_EXPORT std::ostream & | eduart::sensorring::device::operator<< (std::ostream &os, DeviceState state) noexcept |
| Output stream operator for DeviceState. | |
Unified device state enum covering lifecycle and runtime health.
|
strong |
Unified lifecycle and runtime state of a device.
Covers both the device lifecycle (Undefined → Initialized → Idle → Shutdown) and runtime health (Ok, ReceiveError, ProcessError, Error).
| Enumerator | |
|---|---|
| Undefined | Initial state; device not yet configured. |
| Initialized | Device has been configured but not yet started. |
| Idle | Device is running but not actively measuring. |
| Ok | Device is measuring and data is valid. |
| ReceiveError | A CAN receive error was detected. |
| ProcessError | An error occurred while processing received data. |
| Error | General unrecoverable device error. |
| Shutdown | Device has been shut down and should not be used. |
|
noexcept |
Output stream operator for DeviceState.
| [in] | os | Output stream to write to. |
| [in] | state | The state to print. |
|
noexcept |
Convert a DeviceState value to its string representation.
| [in] | state | The state to convert. |