deCONZ C++ API v2.6.1
Loading...
Searching...
No Matches
zcl.h
1#ifndef DECONZ_ZCL_H
2#define DECONZ_ZCL_H
3
4/*
5 * Copyright (c) 2012-2023 dresden elektronik ingenieurtechnik gmbh.
6 * All rights reserved.
7 *
8 * The software in this package is published under the terms of the BSD
9 * style license a copy of which has been included with this distribution in
10 * the LICENSE.txt file.
11 *
12 */
13
14#include <vector>
15#include <QDataStream>
16#include <QVariant>
17#include <QStringList>
18#include <deconz/types.h>
19#include "deconz/declspec.h"
20
21//#define ZCL_LOAD_DBG
22//#define ZCL_LOAD_DBG_COMMAND
23
24#define ZCL_ENUM 0x00
25
95namespace deCONZ
96{
97class ApsDataIndication;
98}
99
100namespace deCONZ
101{
107 enum ZclDataTypeId : unsigned char
108 {
109 ZclNoData = 0x00,
110 Zcl8BitData = 0x08,
111 Zcl16BitData = 0x09,
112 Zcl24BitData = 0x0a,
113 Zcl32BitData = 0x0b,
114 Zcl40BitData = 0x0c,
115 Zcl48BitData = 0x0d,
116 Zcl56BitData = 0x0e,
117 Zcl64BitData = 0x0f,
118 ZclBoolean = 0x10,
119 Zcl8BitBitMap = 0x18,
120 Zcl16BitBitMap = 0x19,
121 Zcl24BitBitMap = 0x1a,
122 Zcl32BitBitMap = 0x1b,
123 Zcl40BitBitMap = 0x1c,
124 Zcl48BitBitMap = 0x1d,
125 Zcl56BitBitMap = 0x1e,
126 Zcl64BitBitMap = 0x1f,
127 Zcl8BitUint = 0x20,
128 Zcl16BitUint = 0x21,
129 Zcl24BitUint = 0x22,
130 Zcl32BitUint = 0x23,
131 Zcl40BitUint = 0x24,
132 Zcl48BitUint = 0x25,
133 Zcl56BitUint = 0x26,
134 Zcl64BitUint = 0x27,
135 Zcl8BitInt = 0x28,
136 Zcl16BitInt = 0x29,
137 Zcl24BitInt = 0x2a,
138 Zcl32BitInt = 0x2b,
139 Zcl40BitInt = 0x2c,
140 Zcl48BitInt = 0x2d,
141 Zcl56BitInt = 0x2e,
142 Zcl64BitInt = 0x2f,
143 Zcl8BitEnum = 0x30,
144 Zcl16BitEnum = 0x31,
145 ZclSemiFloat = 0x38,
146 ZclSingleFloat = 0x39,
147 ZclDoubleFloat = 0x3a,
148 ZclOctedString = 0x41,
149 ZclCharacterString = 0x42,
150 ZclLongOctedString = 0x43,
151 ZclLongCharacterString = 0x44,
152 ZclArray = 0x48,
153 ZclStruct = 0x4c,
154 ZclTimeOfDay = 0xe0,
155 ZclDate = 0xe1,
156 ZclUtcTime = 0xe2,
157 ZclClusterId = 0xe8,
158 ZclAttributeId = 0xe9,
159 ZclBACNetOId = 0xea,
160 ZclIeeeAddress = 0xf0,
161 Zcl128BitSecurityKey = 0xf1
162 };
163
165 enum ZclGeneralCommandId : unsigned char
166 {
167 ZclReadAttributesId = 0x00,
168 ZclReadAttributesResponseId = 0x01,
169 ZclWriteAttributesId = 0x02,
170 ZclWriteAttributesUndividedId = 0x03,
171 ZclWriteAttributesResponseId = 0x04,
172 ZclWriteAttributesNoResponseId = 0x05,
173 ZclConfigureReportingId = 0x06,
174 ZclConfigureReportingResponseId = 0x07,
175 ZclReadReportingConfigId = 0x08,
176 ZclReadReportingConfigResponseId = 0x09,
177 ZclReportAttributesId = 0x0a,
178 ZclDefaultResponseId = 0x0b,
179 ZclDiscoverAttributesId = 0x0c,
180 ZclDiscoverAttributesResponseId = 0x0d,
181 ZclReadAttributesStructuredId = 0x0e,
182 ZclWriteAttributesStructuredId = 0x0f,
183 ZclWriteAttributesStructuredResponseId = 0x10
184 };
185
201 enum ZclFrameControl : unsigned char
202 {
203 ZclFCProfileCommand = 0x00,
204 ZclFCClusterCommand = 0x01,
205 ZclFCManufacturerSpecific = 0x04,
206 ZclFCDirectionServerToClient = 0x08,
207 ZclFCDirectionClientToServer = 0x00,
208 ZclFCEnableDefaultResponse = 0x00,
209 ZclFCDisableDefaultResponse = 0x10
210 };
211
223 class DECONZ_DLLSPEC ZclDataTypeId_t
224 {
225 ZclDataTypeId m_id = ZclNoData;
226
227 public:
229 constexpr ZclDataTypeId_t() {}
231 constexpr explicit ZclDataTypeId_t(quint8 id) : m_id(static_cast<ZclDataTypeId>(id)) { }
233 constexpr ZclDataTypeId_t(ZclDataTypeId id) : m_id(id) { }
234
236 template <class T>
237 ZclDataTypeId_t(T) = delete;
238
240 constexpr bool isValid() const { return m_id > ZclNoData && m_id <= Zcl128BitSecurityKey; }
241
243 explicit operator quint8() const { return m_id; }
245 explicit operator ZclDataTypeId() const { return m_id; }
246
248 constexpr bool operator==(ZclDataTypeId_t other) const { return other.m_id == m_id; }
250 constexpr bool operator!=(ZclDataTypeId_t other) const { return other.m_id != m_id; }
252 constexpr bool operator==(ZclDataTypeId other) const { return other == m_id; }
254 constexpr bool operator!=(ZclDataTypeId other) const { return other != m_id; }
255 };
256
258 DECONZ_DLLSPEC QDataStream & operator<<(QDataStream &ds, ZclDataTypeId_t id);
260 DECONZ_DLLSPEC QDataStream & operator>>(QDataStream &ds, ZclDataTypeId_t &id);
261
295 inline namespace literals {
296 constexpr ZclDataTypeId_t DECONZ_DLLSPEC operator ""_dtid(unsigned long long id)
297 {
298 return ZclDataTypeId_t(static_cast<quint8>(id));
299 }
300 }
301
302 class ZclDataTypePrivate;
303
309 class DECONZ_DLLSPEC ZclDataType
310 {
311 public:
313 ZclDataType();
315 ZclDataType(const ZclDataType &other);
317 ZclDataType &operator=(ZclDataType &other);
319 ZclDataType(uint8_t id, const QString &name, const QString &shortname, int length, char analogDiscrete);
321 ~ZclDataType();
323 uint8_t id() const;
327 ZclDataTypeId_t id_t() const;
329 const QString &name() const;
331 const QString &shortname() const;
333 int length() const;
335 bool isValid() const;
337 bool isAnalog() const;
339 bool isDiscrete() const;
340
341 private:
342 ZclDataTypePrivate *d_ptr;
343 Q_DECLARE_PRIVATE(ZclDataType)
344 };
345
357 class DECONZ_DLLSPEC ZclCommandId_t
358 {
359 quint8 m_id = 0;
360
361 public:
363 constexpr ZclCommandId_t() {}
365 constexpr explicit ZclCommandId_t(quint8 id) : m_id(id) { }
367 constexpr explicit operator quint8() const { return m_id; }
368
370 template <class T>
371 ZclCommandId_t(T) = delete;
372
374 constexpr bool operator==(ZclCommandId_t other) const { return other.m_id == m_id; }
376 constexpr bool operator!=(ZclCommandId_t other) const { return other.m_id != m_id; }
377 };
378
382 DECONZ_DLLSPEC QDataStream & operator<<(QDataStream &ds, ZclCommandId_t id);
386 DECONZ_DLLSPEC QDataStream & operator>>(QDataStream &ds, ZclCommandId_t &id);
387
409 inline namespace literals {
410 constexpr ZclCommandId_t DECONZ_DLLSPEC operator ""_cmdid(unsigned long long id)
411 {
412 return ZclCommandId_t(static_cast<quint8>(id));
413 }
414 }
415
418 {
419 ZclRead = 0x1,
420 ZclWrite = 0x2,
421 ZclReadWrite = 0x3
422 };
423
532 class DECONZ_DLLSPEC ZclAttributeId_t
533 {
534 quint16 m_id = 0;
535
536 public:
538 constexpr ZclAttributeId_t() {}
540 constexpr explicit ZclAttributeId_t(quint16 id) : m_id(id) { }
542 constexpr explicit operator quint16() const { return m_id; }
543
545 template <class T>
546 ZclAttributeId_t(T) = delete;
547
549 constexpr bool operator==(ZclAttributeId_t other) const { return other.m_id == m_id; }
551 constexpr bool operator!=(ZclAttributeId_t other) const { return other.m_id != m_id; }
552 };
553
557 DECONZ_DLLSPEC QDataStream &operator<<(QDataStream &ds, ZclAttributeId_t id);
561 DECONZ_DLLSPEC QDataStream & operator>>(QDataStream &ds, ZclAttributeId_t &id);
562
597 inline namespace literals {
598 constexpr ZclAttributeId_t DECONZ_DLLSPEC operator ""_atid(unsigned long long id)
599 {
600 return ZclAttributeId_t(static_cast<quint16>(id));
601 }
602 }
603
614 class DECONZ_DLLSPEC ManufacturerCode_t
615 {
616 quint16 m_id = 0;
617
618 public:
620 constexpr ManufacturerCode_t() {}
622 constexpr explicit ManufacturerCode_t(quint16 id) : m_id(id) { }
624 constexpr explicit operator quint16() const { return m_id; }
625
627 template <class T>
629
631 constexpr bool operator==(ManufacturerCode_t other) const { return other.m_id == m_id; }
633 constexpr bool operator!=(ManufacturerCode_t other) const { return other.m_id != m_id; }
634 };
635
639 DECONZ_DLLSPEC QDataStream & operator<<(QDataStream &ds, ManufacturerCode_t mfcode);
643 DECONZ_DLLSPEC QDataStream & operator>>(QDataStream &ds, ManufacturerCode_t &mfcode);
644
666 inline namespace literals {
667 constexpr ManufacturerCode_t DECONZ_DLLSPEC operator ""_mfcode(unsigned long long mfcode)
668 {
669 return ManufacturerCode_t(static_cast<quint16>(mfcode));
670 }
671 }
672
673 class ZclAttributePrivate;
674
680 class DECONZ_DLLSPEC ZclAttribute
681 {
682 public:
685 {
686 DefaultFormat = 0,
688 SliderFormat
689 };
691 ZclAttribute();
693 ZclAttribute(uint16_t id, uint8_t type, const QString &name, ZclAccess access, bool required);
697 ZclAttribute(ZclAttributeId_t id, ZclDataTypeId_t type, const QString &name, ZclAccess access, bool required);
699 ZclAttribute(const ZclAttribute &other);
701 ZclAttribute(ZclAttribute &&other) noexcept;
703 ZclAttribute &operator=(const ZclAttribute &other);
705 ZclAttribute &operator=(ZclAttribute &&other) noexcept;
709 uint16_t id() const;
713 ZclAttributeId_t id_t() const;
715 const QString &description() const;
717 void setDescription(const QString &description);
719 uint8_t dataType() const;
723 ZclDataTypeId_t dataType_t() const;
725 void setDataType(uint8_t type);
727 const QString &name() const;
728 /* \cond INTERNAL_SYMBOLS */
729 uint8_t subType() const;
730 void setSubType(uint8_t subType);
731 /* \endcond */
733 const NumericUnion &numericValue() const;
735 void setNumericValue(const NumericUnion &value);
736
745 QString valueNameAt(int bitOrEnum) const;
747 QStringList valuesNames() const;
749 const std::vector<int> &valueNamePositions() const;
751 void setValue(bool value);
753 void setValue(quint64 value);
755 void setValue(qint64 value);
757 void setValue(const QVariant &value);
759 /* \cond INTERNAL_SYMBOLS */
760 void setLastRead(time_t time);
761 uint16_t listSizeAttribute() const;
762 void setListSizeAttribute(uint16_t id);
763 bool isList() const;
764 int listSize() const;
765 void setListSize(int listSize);
766 /* \endcond */
768 int64_t lastRead() const;
770 bool isReadonly() const;
772 bool isMandatory() const;
774 bool isAvailable() const;
776 void setAvailable(bool available);
778 uint8_t numericBase() const;
780 void setNumericBase(uint8_t base);
782 uint enumerator() const;
784 void setEnumerator(uint value);
786 void setBit(uint bit, bool one);
788 bool bit(int bit) const;
790 int bitCount() const;
792 quint64 bitmap() const;
794 void setBitmap(quint64 bmp);
796 int enumCount() const;
798 quint8 enumerationId() const;
800 void setEnumerationId(quint8 id);
802 bool writeToStream(QDataStream &stream) const;
804 bool readFromStream(QDataStream &stream);
806 QString toString(FormatHint formatHint = DefaultFormat) const;
808 QString toString(const deCONZ::ZclDataType &dataType, FormatHint formatHint = DefaultFormat) const;
810 const QVariant &toVariant() const;
812 uint16_t minReportInterval() const;
814 void setMinReportInterval(uint16_t interval);
816 uint16_t maxReportInterval() const;
818 void setMaxReportInterval(uint16_t interval);
820 uint16_t reportTimeoutPeriod() const;
822 void setReportTimeoutPeriod(uint16_t period);
824 const NumericUnion &reportableChange() const;
826 void setReportableChange(const NumericUnion &reportableChange);
828 bool writeReportableChangeToStream(QDataStream &stream) const;
830 bool readReportableChangeFromStream(QDataStream &stream);
832 void setFormatHint(FormatHint formatHint);
834 FormatHint formatHint() const;
836 int rangeMin() const;
838 void setRangeMin(int rangeMin);
840 int rangeMax() const;
842 void setRangeMax(int rangeMax);
844 quint16 manufacturerCode() const;
848 ManufacturerCode_t manufacturerCode_t() const;
850 void setManufacturerCode(quint16 mfcode);
854 void setManufacturerCode(ManufacturerCode_t mfcode);
856 bool isManufacturerSpecific() const;
857
858 /* \cond INTERNAL_SYMBOLS */
859 void setAttributeSet(quint16 attrSetId, quint16 mfcode);
860 quint16 attributeSet() const;
861 quint16 attributeSetManufacturerCode() const;
862 /* \endcond */
863
864 private:
865 friend class ZclDataBase;
866 ZclAttributePrivate *d_ptr = nullptr;
867 Q_DECLARE_PRIVATE(ZclAttribute)
868 };
869
870 class ZclAttributeSetPrivate;
871
877 class DECONZ_DLLSPEC ZclAttributeSet
878 {
879 public:
883 ZclAttributeSet(const ZclAttributeSet &other);
885 ZclAttributeSet &operator= (const ZclAttributeSet &other);
887 ZclAttributeSet(uint16_t id, const QString &description);
891 uint16_t id() const;
893 const QString &description() const;
895 const std::vector<int> &attributes() const;
899 void addAttribute(int idx);
901 quint16 manufacturerCode() const;
903 void setManufacturerCode(quint16 mfcode);
904
905 private:
906 ZclAttributeSetPrivate *d_ptr = nullptr;
907 Q_DECLARE_PRIVATE(ZclAttributeSet)
908 };
909
912 {
913 ClientCluster = 0,
914 ServerCluster = 1
915 };
916
917 class ZclFramePrivate;
918
924 class DECONZ_DLLSPEC ZclFrame
925 {
926 public:
928 ZclFrame();
930 ZclFrame(const ZclFrame &other);
932 ZclFrame &operator=(const ZclFrame &other);
934 virtual ~ZclFrame();
938 uint8_t frameControl() const;
942 void setFrameControl(uint8_t frameControl);
944 uint16_t manufacturerCode() const;
948 ManufacturerCode_t manufacturerCode_t() const;
950 void setManufacturerCode(uint16_t code);
954 void setManufacturerCode(ManufacturerCode_t code);
956 uint8_t sequenceNumber() const;
958 void setSequenceNumber(uint8_t seqNumber);
960 uint8_t commandId() const;
964 ZclCommandId_t commandId_t() const;
966 void setCommandId(uint8_t commandId);
970 void setCommandId(ZclCommandId_t commandId);
975 unsigned char payloadAt(int index) const;
977 const QByteArray &payload() const;
979 QByteArray &payload();
981 void setPayload(const QByteArray &payload);
985 void writeToStream(QDataStream &stream);
989 void readFromStream(QDataStream &stream);
991 bool isClusterCommand() const;
993 bool isProfileWideCommand() const;
995 bool isDefaultResponse() const;
999 bool isValid() const;
1001 uint8_t defaultResponseCommandId() const;
1005 ZclCommandId_t defaultResponseCommandId_t() const;
1007 ZclStatus defaultResponseStatus() const;
1011 void reset();
1012
1013 private:
1014 ZclFramePrivate *d_ptr = nullptr;
1015 Q_DECLARE_PRIVATE(ZclFrame)
1016 };
1017
1018 class ZclCommandPrivate;
1019
1025 class DECONZ_DLLSPEC ZclCommand
1026 {
1027 public:
1029 ZclCommand();
1031 ZclCommand(const ZclCommand &other);
1033 ZclCommand(ZclCommand &&other) noexcept;
1035 ZclCommand&operator=(const ZclCommand &other);
1037 ZclCommand&operator=(ZclCommand &&other) noexcept;
1039 ZclCommand(uint8_t id, const QString &name, bool required, bool recv, const QString &description = QString());
1041 ~ZclCommand();
1043 uint8_t id() const;
1047 ZclCommandId_t id_t() const;
1049 void setId(uint8_t id);
1051 uint16_t manufacturerId() const;
1053 void setManufacturerId(uint16_t id);
1055 bool isValid() const;
1057 uint8_t responseId() const;
1059 void setResponseId(uint8_t id);
1061 bool hasResponse() const;
1063 bool directionReceived() const;
1065 bool directionSend() const;
1067 const QString &name() const;
1069 const QString &description() const;
1071 void setDescription(const QString &description);
1073 bool isProfileWide() const;
1075 void setIsProfileWide(bool profileWide);
1077 bool disableDefaultResponse() const;
1079 void setDisableDefaultResponse(bool disable);
1081 const std::vector<ZclAttribute> &parameters() const;
1083 std::vector<ZclAttribute> &parameters();
1085 bool readFromStream(QDataStream &stream);
1087 bool writeToStream(QDataStream &stream) const;
1088
1089 private:
1090 ZclCommandPrivate *d_ptr = nullptr;
1091 Q_DECLARE_PRIVATE(ZclCommand)
1092 };
1093
1105 class DECONZ_DLLSPEC ZclClusterId_t
1106 {
1107 quint16 m_id = 0;
1108
1109 public:
1111 constexpr ZclClusterId_t() {}
1113 constexpr explicit ZclClusterId_t(quint16 id) : m_id(id) { }
1115 constexpr explicit operator quint16() const { return m_id; }
1116
1118 template <class T>
1119 ZclClusterId_t(T) = delete;
1120
1122 constexpr bool operator==(ZclClusterId_t other) const { return other.m_id == m_id; }
1124 constexpr bool operator!=(ZclClusterId_t other) const { return other.m_id != m_id; }
1125 };
1126
1130 DECONZ_DLLSPEC QDataStream &operator<<(QDataStream &ds, ZclClusterId_t id);
1134 DECONZ_DLLSPEC QDataStream &operator>>(QDataStream &ds, ZclClusterId_t &id);
1135
1157 inline namespace literals {
1158 constexpr ZclClusterId_t DECONZ_DLLSPEC operator ""_clid(unsigned long long id)
1159 {
1160 return ZclClusterId_t(static_cast<quint16>(id));
1161 }
1162 }
1163
1164 class ZclClusterPrivate;
1165
1172 class DECONZ_DLLSPEC ZclCluster
1173 {
1174 public:
1176 ZclCluster();
1178 ZclCluster(const ZclCluster &other);
1180 ZclCluster(uint16_t id, const QString &name, const QString &description = QString());
1182 ZclCluster &operator=(const ZclCluster &other);
1184 ~ZclCluster();
1186 uint16_t id() const;
1190 ZclClusterId_t id_t() const;
1192 void setId(uint16_t id);
1194 uint16_t oppositeId() const;
1196 void setOppositeId(uint16_t id);
1198 uint16_t manufacturerCode() const;
1202 ManufacturerCode_t manufacturerCode_t() const;
1204 void setManufacturerCode(uint16_t manufacturerCode);
1208 void setManufacturerCode(ManufacturerCode_t manufacturerCode);
1210 const QString &name() const;
1212 const QString &description() const;
1214 void setDescription(const QString &description);
1216 bool isValid() const;
1218 bool isZcl() const;
1220 void setIsZcl(bool isZcl);
1222 bool isServer() const;
1224 bool isClient() const;
1226 void setIsServer(bool isServer);
1228 std::vector<ZclAttribute> &attributes();
1230 const std::vector<ZclAttribute> &attributes() const;
1232 std::vector<ZclAttributeSet> &attributeSets();
1234 const std::vector<ZclAttributeSet> &attributeSets() const;
1236 bool readCommand(const ZclFrame &zclFrame);
1238 bool readCommand(const ApsDataIndication &ind);
1240 std::vector<ZclCommand> &commands();
1242 const std::vector<ZclCommand> &commands() const;
1243
1244 private:
1245 ZclClusterPrivate *d_ptr = nullptr;
1246 Q_DECLARE_PRIVATE(ZclCluster)
1247 };
1248
1249
1250 class ZclMemoryPrivate;
1251
1252 class DECONZ_DLLSPEC ZclMemory
1253 {
1254 public:
1255 ZclMemory();
1256 ~ZclMemory();
1257
1258 /* \cond INTERNAL_SYMBOLS */
1259 ZclMemoryPrivate *d = nullptr; // opaque pointer only used internally
1260 /* \endcond */
1261 };
1262
1263 DECONZ_DLLSPEC ZclCluster ZCL_InCluster(uint16_t profileId, uint16_t clusterId, uint16_t mfcode);
1264 DECONZ_DLLSPEC ZclCluster ZCL_OutCluster(uint16_t profileId, uint16_t clusterId, uint16_t mfcode);
1265 DECONZ_DLLSPEC ZclDataType ZCL_DataType(uint8_t id);
1266 DECONZ_DLLSPEC ZclDataType ZCL_DataType(const QString &name);
1267
1268} // namespace deCONZ
1269
1270#endif // DECONZ_ZCL_H
APSDE-DATA.indication primitive.
Definition aps.h:408
A strong typed Zigbee manufacturer code.
Definition zcl.h:615
ManufacturerCode_t(T)=delete
Don't allow construction via implicit integer conversion.
constexpr ManufacturerCode_t(quint16 id)
Explicit constructor to init by value.
Definition zcl.h:622
constexpr bool operator!=(ManufacturerCode_t other) const
Not equal operator, requires strong type.
Definition zcl.h:633
constexpr ManufacturerCode_t()
Default constructor, with value = 0.
Definition zcl.h:620
constexpr bool operator==(ManufacturerCode_t other) const
Equal operator, requires strong type.
Definition zcl.h:631
A strong typed ZCL attribute identifier.
Definition zcl.h:533
constexpr bool operator!=(ZclAttributeId_t other) const
Not equal operator, requires strong type.
Definition zcl.h:551
constexpr ZclAttributeId_t(quint16 id)
Explicit constructor to init by value.
Definition zcl.h:540
constexpr bool operator==(ZclAttributeId_t other) const
Equal operator, requires strong type.
Definition zcl.h:549
ZclAttributeId_t(T)=delete
Don't allow construction via implicit integer conversion.
constexpr ZclAttributeId_t()
Default constructor, with value = 0.
Definition zcl.h:538
Definition zcl_private.h:54
Definition zcl_private.h:110
Represents a named group of ZclAttribute.
Definition zcl.h:878
Represents a ZigBee cluster attribute.
Definition zcl.h:681
FormatHint
Used to change the display format in the GUI.
Definition zcl.h:685
@ Prefix
Prepend prefix like 0x or 0b.
Definition zcl.h:687
A strong typed ZCL cluster identifier.
Definition zcl.h:1106
constexpr ZclClusterId_t()
Default constructor, with value = 0.
Definition zcl.h:1111
constexpr bool operator==(ZclClusterId_t other) const
Equal operator, requires strong type.
Definition zcl.h:1122
ZclClusterId_t(T)=delete
Don't allow construction via implicit integer conversion.
constexpr ZclClusterId_t(quint16 id)
Explicit constructor to init by value.
Definition zcl.h:1113
constexpr bool operator!=(ZclClusterId_t other) const
Not equal operator, requires strong type.
Definition zcl.h:1124
Definition zcl_private.h:120
Represents a ZigBee cluster (ZCL and non-ZCL).
Definition zcl.h:1173
A strong typed ZCL command identifier.
Definition zcl.h:358
constexpr ZclCommandId_t()
Default constructor, with value = 0.
Definition zcl.h:363
ZclCommandId_t(T)=delete
Don't allow construction via implicit integer conversion.
constexpr ZclCommandId_t(quint8 id)
Explicit constructor to init by value.
Definition zcl.h:365
constexpr bool operator!=(ZclCommandId_t other) const
Not equal operator, requires strong type.
Definition zcl.h:376
constexpr bool operator==(ZclCommandId_t other) const
Equal operator, requires strong type.
Definition zcl.h:374
Definition zcl_private.h:166
Represents a ZigBee cluster command (ZCL and non-ZCL).
Definition zcl.h:1026
Definition zcl_private.h:286
A strong typed ZCL data type identifier.
Definition zcl.h:224
constexpr ZclDataTypeId_t()
Default constructor with value = ZclNoData.
Definition zcl.h:229
ZclDataTypeId_t(T)=delete
Don't allow construction via implicit integer conversion.
constexpr bool operator==(ZclDataTypeId other) const
Equal operator, requires ZclDataTypeId enum.
Definition zcl.h:252
constexpr bool operator!=(ZclDataTypeId_t other) const
Not equal operator, requires strong type.
Definition zcl.h:250
constexpr ZclDataTypeId_t(ZclDataTypeId id)
Constructor to init by enum value (preferred).
Definition zcl.h:233
constexpr bool isValid() const
Returns true for known data types.
Definition zcl.h:240
constexpr ZclDataTypeId_t(quint8 id)
Explicit constructor to init by value.
Definition zcl.h:231
constexpr bool operator==(ZclDataTypeId_t other) const
Equal operator, requires strong type.
Definition zcl.h:248
constexpr bool operator!=(ZclDataTypeId other) const
Not equal operator, requires ZclDataTypeId enum.
Definition zcl.h:254
Definition zcl_private.h:148
Represents the data type of a ZigBee cluster attribute.
Definition zcl.h:310
Definition zcl_private.h:136
Helper to build ZCL based payloads to be transported via ApsDataRequest.
Definition zcl.h:925
Definition zcl.cpp:146
Definition zcl.h:1253
ZclStatus
Common ZigBee Cluster Library (ZCL) status codes.
Definition types.h:123
ZclDataTypeId
Various data types as defined in ZigBee ZCL specification.
Definition zcl.h:108
The deCONZ namespace.
Definition aps.cpp:19
ZclAccess
Allowed access method of a ZclAttribute.
Definition zcl.h:418
ZclClusterSide
ZCL cluster side where client is a out cluster and server is a in cluster.
Definition zcl.h:912
DECONZ_DLLSPEC QDataStream & operator>>(QDataStream &ds, ZclDataTypeId_t &id)
Reads ZclDataTypeId_t as quint8 from the QDataStream.
Definition zcl.cpp:2726
DECONZ_DLLSPEC QDataStream & operator<<(QDataStream &ds, ZclDataTypeId_t id)
Writes ZclDataTypeId_t as quint8 to the QDataStream.
Definition zcl.cpp:2720
ZclFrameControl
General ZCL Frame Format.
Definition zcl.h:202
ZclGeneralCommandId
General ZCL command ids every cluster shall support.
Definition zcl.h:166
Declaration of the most common deCONZ library types.
Holds various numeric values 8-64 bit, signed and unsigned.
Definition types.h:329