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).
|
|
|
unsigned int | idx = 0 |
| | Board index.
|
|
Version | version = {} |
| | Firmware/board version from enumeration response.
|
|
CommitHash | hash = {} |
| | Commit hash from enumeration response.
|
|
SensorBoardType | type = SensorBoardType::Undefined |
| | Detected or configured board type.
|
|
std::uint16_t | device_options = 0 |
| | Bitmask describing which devices are physically populated on the board.
|
|
std::vector< DeviceType > | devices |
| | Devices on the board.
|
|
ConnectionState | state = ConnectionState::Undefined |
| | Configuration/connection state after enumeration.
|
|
ConfigurationState | config_state = ConfigurationState::Undefined |
| | Configuration state set by the factory during build().
|
|
std::vector< DeviceType > | configured_devices |
| | Device types that were instantiated by the factory (subset of devices).
|
Information reported by a board during enumeration: index, version, commit hash, board type, and state.
◆ fromBuffer()
| EnumerationInformation eduart::device::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::device::EnumerationInformation::hasDevice |
( |
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::device::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<()
Order by index for sorting.
- Parameters
-
| [in] | other | Value to compare with. |
- Returns
- true if idx < other.idx.
◆ operator==() [1/2]
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::device::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::device::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: