deCONZ C++ API v2.6.1
Loading...
Searching...
No Matches
deCONZ::literals Namespace Reference

Literal to create ZclDataTypeId_t. More...

Functions

constexpr ZclDataTypeId_t DECONZ_DLLSPEC operator""_dtid (unsigned long long id)
 
constexpr ZclCommandId_t DECONZ_DLLSPEC operator""_cmdid (unsigned long long id)
 
constexpr ZclAttributeId_t DECONZ_DLLSPEC operator""_atid (unsigned long long id)
 
constexpr ManufacturerCode_t DECONZ_DLLSPEC operator""_mfcode (unsigned long long mfcode)
 
constexpr ZclClusterId_t DECONZ_DLLSPEC operator""_clid (unsigned long long id)
 

Detailed Description

Literal to create ZclDataTypeId_t.

Literal to create ZclClusterId_t.

Literal to create ManufacturerCode_t.

Literal to create ZclAttributeId_t.

Literal to create ZclCommandId_t.

Since
v2.6.1

Shorthand for creating type safe ZCL data type identifiers from numbers but without casting.

Example usage for streams

QDataStream stream;
stream << 0x01_dtid;
// same as
stream << ZclDataTypeId_t(quint8(0x01));
A strong typed ZCL data type identifier.
Definition zcl.h:224

Example usage in ZclDataTypeId_t constructors and assignment

ZclDataTypeId_t dt0(0x01_dtid); // constructor
ZclDataTypeId_t dt1 = 0x02_dtid; // assignment
if (dt0 == dt1) { }
if (dt0 == 0x03_dtid) {}
Since
v2.6.1

Shorthand for creating type safe ZCL command identifiers from numbers but without casting.

Example usage for streams

QDataStream stream;
stream << 0x05_cmdid;
// same as
stream << ZclCommandId_t(static_cast<quint8>(0x05)));
Since
2.6.1

Shorthand for creating type safe ZCL attribute identifiers from numbers but without casting.

Example usage for streams

QDataStream stream;
stream << 0x0001_atid;
// same as
stream << ZclAttributeId_t(quint16(0x0001));
A strong typed ZCL attribute identifier.
Definition zcl.h:533

Example usage in ZclAttributeId_t constructors and assignment

ZclAttributeId_t at0(0x0001_atid); // constructor
ZclAttributeId_t at1 = 0x0002_atid; // assignment
if (at0 == at1) { }
if (at0 == 0x0003_atid) {}
Since
2.6.1

Shorthand for creating type safe manufacturer codes from numbers but without casting.

Example usage for streams

QDataStream stream;
stream << 0x1135_mfcode;
// same as
stream << ManufacturerCode_t(static_cast<quint16>(0x1135)));
Since
v2.6.1

Shorthand for creating type safe cluster identifiers from numbers but without casting.

Example usage for streams

QDataStream stream;
stream << 0x0500_clid;
// same as
stream << ZclClusterId_t(static_cast<quint16>(0x0500)));