EduArt Sensor Ring Library 3.0.0
Loading...
Searching...
No Matches
DeviceState.hpp File Reference

Unified device state enum covering lifecycle and runtime health. More...

#include <ostream>
#include <string>
#include "sensorring/platform/SensorringExport.hpp"
Include dependency graph for DeviceState.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  eduart::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::device::toString (DeviceState state) noexcept
 Convert a DeviceState value to its string representation.
SENSORRING_EXPORT std::ostream & eduart::device::operator<< (std::ostream &os, DeviceState state) noexcept
 Output stream operator for DeviceState.

Detailed Description

Unified device state enum covering lifecycle and runtime health.

Author
EduArt Robotik GmbH
Date
2025-02-09

Enumeration Type Documentation

◆ DeviceState

enum class eduart::device::DeviceState
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).

Function Documentation

◆ operator<<()

SENSORRING_EXPORT std::ostream & eduart::device::operator<< ( std::ostream & os,
DeviceState state )
noexcept

Output stream operator for DeviceState.

Parameters
[in]osOutput stream to write to.
[in]stateThe state to print.
Returns
The stream with the state name written out.

◆ toString()

SENSORRING_EXPORT std::string eduart::device::toString ( DeviceState state)
noexcept

Convert a DeviceState value to its string representation.

Parameters
[in]stateThe state to convert.
Returns
Name of the state as a string.