Information reported by a board during enumeration: index, version, commit hash, board type, and state.
More...
#include <EnumerationInformation.hpp>
|
| static EnumerationInformation | fromBuffer (const std::vector< uint8_t > &buffer) |
| | Parse enumeration info from the raw response buffer (e.g. CMD_ACTIVE_DEVICE_RESPONSE payload).
|
Information reported by a board during enumeration: index, version, commit hash, board type, and state.
◆ fromBuffer()
| EnumerationInformation eduart::sensorring::board::EnumerationInformation::fromBuffer |
( |
const std::vector< uint8_t > & | buffer | ) |
|
|
static |
Parse enumeration info from the raw response buffer (e.g. CMD_ACTIVE_DEVICE_RESPONSE payload).
- Parameters
-
| [in] | buffer | Raw bytes from the device. |
- Returns
- Parsed EnumerationInformation.
◆ hasDevice()
| bool eduart::sensorring::board::EnumerationInformation::hasDevice |
( |
device::DeviceType | type | ) |
const |
|
noexcept |
Check if a specific device type is reported as populated.
- Parameters
-
| [in] | type | Device type to check. |
- Returns
- true if the corresponding bit is set in device_options.
◆ isUndefined()
| bool eduart::sensorring::board::EnumerationInformation::isUndefined |
( |
| ) |
const |
|
noexcept |
Return true if this instance has not been filled from a valid enumeration response.
- Returns
- true if state/type are Undefined and idx is 0.
◆ operator<()
| bool eduart::sensorring::board::EnumerationInformation::operator< |
( |
const EnumerationInformation & | other | ) |
const |
|
noexcept |
Order by index for sorting.
- Parameters
-
| [in] | other | Value to compare with. |
- Returns
- true if idx < other.idx.
◆ operator==() [1/2]
| bool eduart::sensorring::board::EnumerationInformation::operator== |
( |
const EnumerationInformation & | other | ) |
const |
|
noexcept |
Compare two EnumerationInformation values for equality.
- Parameters
-
| [in] | other | Value to compare with. |
- Returns
- true if all fields are equal.
◆ operator==() [2/2]
| bool eduart::sensorring::board::EnumerationInformation::operator== |
( |
unsigned int | other | ) |
const |
|
noexcept |
Compare enumeration index to an integer.
- Parameters
-
| [in] | other | Index to compare with idx. |
- Returns
- true if idx == other.
◆ toString()
| std::string eduart::sensorring::board::EnumerationInformation::toString |
( |
| ) |
const |
Format this board's enumeration info as a human-readable string.
- Returns
- Multi-line string describing the board.
The documentation for this struct was generated from the following file: