EduArt Sensor Ring Library 3.0.0
Loading...
Searching...
No Matches
eduart::device::DeviceID Class Reference

Identifier for a device: type, human-readable name, and index. More...

#include <DeviceID.hpp>

Public Member Functions

DeviceType getType () const
 Returns the hardware device type.
unsigned int getIndex () const
 Returns the instance index when multiple devices of the same type exist.
bool isValid () const
 Check if the device ID belongs to a valid device.

Public Attributes

DeviceType type = DeviceType::UNDEFINED
 Hardware device type.
unsigned int index = 0
 Instance index when multiple devices of same type exist.

Detailed Description

Identifier for a device: type, human-readable name, and index.

Member Function Documentation

◆ getIndex()

unsigned int eduart::device::DeviceID::getIndex ( ) const
inline

Returns the instance index when multiple devices of the same type exist.

Returns
Index value.

◆ getType()

DeviceType eduart::device::DeviceID::getType ( ) const
inline

Returns the hardware device type.

Returns
DeviceType of this ID.

◆ isValid()

bool eduart::device::DeviceID::isValid ( ) const
inline

Check if the device ID belongs to a valid device.

Returns
true if this ID represents a valid device.

The documentation for this class was generated from the following file: