![]() |
Open Lighting Architecture 0.10.9
|
Represents a RDM UID.
UIDs are 6 bytes, the first two bytes are the manufacturer code and the last 4 bytes are the device id. UIDs are written as:
Public Types | |
| enum | { LENGTH = 6 } |
| enum | { UID_SIZE = 6 } |
Public Member Functions | |
| UID (uint16_t esta_id, uint32_t device_id) | |
| Constructs a new UID. | |
| UID (const UID &uid) | |
| Copy constructor. | |
| UID (const uint8_t *data) | |
| Construct a new UID from binary data. | |
| UID & | operator= (const UID &other) |
| Assignment operator. | |
| bool | operator== (const UID &other) const |
| Equality operator. | |
| bool | operator!= (const UID &other) const |
| Inequality operator. | |
| bool | operator> (const UID &other) const |
| Greater than. | |
| bool | operator< (const UID &other) const |
| Less than. | |
| uint16_t | ManufacturerId () const |
| The manufacturer ID for this UID. | |
| uint32_t | DeviceId () const |
| The device ID for this UID. | |
| bool | IsBroadcast () const |
| Check if this UID is a broadcast or vendorcast UID. | |
| bool | DirectedToUID (const UID &uid) const |
| Check if this UID matches against another. | |
| std::string | ToString () const |
| Convert a UID to a human readable string. | |
| bool | Pack (uint8_t *buffer, unsigned int length) const |
| Write the binary representation of the UID to memory. | |
Static Public Member Functions | |
| static UID | AllDevices () |
| Returns a UID that matches all devices (ffff:ffffffff). | |
| static UID | VendorcastAddress (uint16_t esta_id) |
| Returns a UID that matches all devices for a particular manufacturer. | |
| static UID | VendorcastAddress (UID uid) |
| Returns a UID that matches all devices for a particular manufacturer. | |
| static UID * | FromString (const std::string &uid) |
| Return a new UID from a string. | |
Static Public Attributes | |
| static const uint16_t | ALL_MANUFACTURERS = 0xffff |
| The value for the 'all manufacturers' id. | |
| static const uint32_t | ALL_DEVICES = 0xffffffff |
| The value for the 'all devices' id. | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const UID &uid) |
| A helper function to write a UID to an ostream. | |
|
inline |
Constructs a new UID.
| esta_id | the ESTA (manufacturer ID). |
| device_id | the device ID. |
|
inline |
Copy constructor.
| uid | the UID to copy. |
|
inlineexplicit |
|
inlinestatic |
Returns a UID that matches all devices (ffff:ffffffff).
|
inline |
|
inline |
Check if this UID matches against another.
| uid | the UID to check against |
This is useful to determine if a responder should reply to a message.
|
static |
|
inline |
|
inline |
|
inline |
Inequality operator.
| other | the UID to compare to. |
|
inline |
Less than.
| other | the UID to compare to. |
|
inline |
Equality operator.
| other | the UID to compare to. |
|
inline |
Greater than.
| other | the UID to compare to. |
|
inline |
|
inline |
Convert a UID to a human readable string.
|
inlinestatic |
|
inlinestatic |
Returns a UID that matches all devices for a particular manufacturer.
| esta_id | the manufacturer id of the devices to match. |
|
friend |