RDM
HEAD (unstable)
Implementation of ANSI E1.31 (Streaming ACN)
|
View other versions:
|
A C++ wrapper class for the RDM UID type. More...
Public Member Functions | |
Uid ()=default | |
Constructs a null UID by default. | |
constexpr | Uid (uint16_t manu_val, uint32_t id_val) noexcept |
Construct a UID explicitly from an ESTA Manufacturer ID and a device ID. | |
constexpr | Uid (const RdmUid &c_uid) noexcept |
Construct a UID copied from an instance of the C RdmUid type. | |
Uid & | operator= (const RdmUid &c_uid) noexcept |
Assign an instance of the C RdmUid type to an instance of this class. | |
constexpr const RdmUid & | get () const noexcept |
Get a const reference to the underlying C type. | |
ETCPAL_CONSTEXPR_14 RdmUid & | get () noexcept |
Get a mutable reference to the underlying C type. | |
constexpr uint16_t | manufacturer_id () const noexcept |
Get the ESTA Manufacturer ID portion of this UID. | |
constexpr uint32_t | device_id () const noexcept |
Get the Device ID portion of this UID. | |
std::string | ToString () const |
Convert a UID to a string representation. More... | |
constexpr bool | IsValid () const noexcept |
Determine if a UID is valid. All UIDs are valid unless they are null (all 0's). | |
bool | IsBroadcast () const noexcept |
Determine whether a UID is the E1.20 value BROADCAST_ALL_DEVICES_ID. | |
bool | IsControllerBroadcast () const noexcept |
Determine whether a UID is the E1.33 value RPT_ALL_CONTROLLERS. | |
bool | IsDeviceBroadcast () const noexcept |
Determine whether a UID is the E1.33 value RPT_ALL_DEVICES. | |
bool | IsDeviceManufacturerBroadcast () const noexcept |
Determine whether a UID is one of the E1.33 values defined by RPT_ALL_MID_DEVICES. More... | |
constexpr bool | BroadcastManufacturerIdMatches (uint16_t manu_val) const noexcept |
Determine whether an RDMnet Device Manufacturer Broadcast UID matches a specific ESTA Manufacturer ID. | |
constexpr uint16_t | DeviceBroadcastManufacturerId () const noexcept |
Get the ESTA Manufacturer ID from an RDMnet Device Manufacturer Broadcast UID. | |
constexpr bool | IsDynamic () const noexcept |
Determine whether a UID is a Dynamic UID as defined in ANSI E1.33. More... | |
constexpr bool | IsDynamicUidRequest () const noexcept |
Determine whether a UID is a Dynamic UID Request as defined in ANSI E1.33. | |
constexpr bool | IsStatic () const noexcept |
Determine whether a UID is a Static UID as defined in ANSI E1.33. More... | |
void | SetManufacturerId (uint16_t manu_val) noexcept |
Set the ESTA Manufacturer ID portion of this UID. More... | |
void | SetDeviceId (uint32_t id_val) noexcept |
Set the Device ID portion of this UID. | |
Static Public Member Functions | |
static Uid | FromString (const std::string &uid_str) noexcept |
Create a UID from a string representation. More... | |
static Uid | FromString (const char *uid_str) noexcept |
Create a UID from a string representation. More... | |
static Uid | Broadcast () noexcept |
Create a UID representing BROADCAST_ALL_DEVICES_ID as defined in ANSI E1.20. | |
static Uid | ControllerBroadcast () noexcept |
Create a UID representing RPT_ALL_CONTROLLERS as defined in ANSI E1.33. | |
static Uid | DeviceBroadcast () noexcept |
Create a UID representing RPT_ALL_DEVICES as defined in ANSI E1.33. | |
static Uid | DeviceBroadcast (uint16_t manu_val) noexcept |
Create a UID representing RPT_ALL_MID_DEVICES as defined in ANSI E1.33. | |
static Uid | Static (uint16_t manu_val, uint32_t id_val) noexcept |
Explicitly create an RDMnet Static UID from an ESTA Manufacturer ID and Device ID. More... | |
static Uid | DynamicUidRequest (uint16_t manu_val) noexcept |
Create an RDMnet Dynamic UID Request from a given ESTA Manufacturer ID. | |
A C++ wrapper class for the RDM UID type.
Provides C++ syntactic sugar for working with RDM UIDs. You can convert from the basic C type implicitly, and to it explicitly:
Or construct directly from the ESTA Manufacturer ID and Device ID:
Or use one of the special UID generators:
There are also inspectors to check whether a UID is any of the above special types.
Use ToString() to get a string representation:
|
inlinestaticnoexcept |
Create a UID from a string representation.
See rdm_string_to_uid() for more information.
|
inlinestaticnoexcept |
Create a UID from a string representation.
See rdm_string_to_uid() for more information.
|
inlinenoexcept |
Determine whether a UID is one of the E1.33 values defined by RPT_ALL_MID_DEVICES.
See RDMNET_UID_IS_DEVICE_MANU_BROADCAST() for more information.
|
constexprnoexcept |
Determine whether a UID is a Dynamic UID as defined in ANSI E1.33.
See RDMNET_UID_IS_DYNAMIC() for more information.
|
constexprnoexcept |
Determine whether a UID is a Static UID as defined in ANSI E1.33.
See RDMNET_UID_IS_STATIC() for more information.
|
inlinenoexcept |
Set the ESTA Manufacturer ID portion of this UID.
The top bit of manu_val (the dynamic vs static bit in RDMnet) is disregarded and the top bit of manufacturer_id() remains as it was before this function was called.
|
inlinestaticnoexcept |
Explicitly create an RDMnet Static UID from an ESTA Manufacturer ID and Device ID.
The top bit of manu_val is masked off and the top bit of manufacturer_id() is always 0 after this function is called.
|
inline |
Convert a UID to a string representation.
See rdm_uid_to_string() for more information on the format.