deCONZ C++ API v2.6.1
|
A strong typed ZCL data type identifier. More...
#include <zcl.h>
Public Member Functions | |
constexpr | ZclDataTypeId_t () |
Default constructor with value = ZclNoData . | |
constexpr | ZclDataTypeId_t (quint8 id) |
Explicit constructor to init by value. | |
constexpr | ZclDataTypeId_t (ZclDataTypeId id) |
Constructor to init by enum value (preferred). | |
template<class T > | |
ZclDataTypeId_t (T)=delete | |
Don't allow construction via implicit integer conversion. | |
constexpr bool | isValid () const |
Returns true for known data types. | |
operator quint8 () const | |
Explicit quint8 conversion operator, requires static_cast<quint8>() . | |
operator ZclDataTypeId () const | |
Explicit ZclDataTypeId conversion operator, requires static_cast<ZclDataTypeId>() . | |
constexpr bool | operator== (ZclDataTypeId_t other) const |
Equal operator, requires strong type. | |
constexpr bool | operator!= (ZclDataTypeId_t other) const |
Not equal operator, requires strong type. | |
constexpr bool | operator== (ZclDataTypeId other) const |
Equal operator, requires ZclDataTypeId enum. | |
constexpr bool | operator!= (ZclDataTypeId other) const |
Not equal operator, requires ZclDataTypeId enum. | |
A strong typed ZCL data type identifier.
This wrapper around quint8 data type as ZCL data type identifier for code correctness. It helps to prevent common hard to catch programming errors. The class is very strict and enforces a type safe programming style.