From ed356ad0cc804d87127b91b5fcb709bf1d98328b Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 28 Jun 2021 10:47:55 +0200 Subject: [PATCH] Add ids/Commands.h to the gen folder of src/app/common --- examples/pump-app/pump-common/gen/encoder.cpp | 148 +- .../pump-controller-common/gen/encoder.cpp | 279 +- src/app/common/gen/ids/Attributes.h | 1569 +++++++++ src/app/common/gen/ids/Clusters.h | 341 ++ src/app/common/gen/ids/Commands.h | 736 +++++ src/controller/data_model/gen/encoder.cpp | 2921 ++++++++++------- 6 files changed, 4661 insertions(+), 1333 deletions(-) create mode 100644 src/app/common/gen/ids/Attributes.h create mode 100644 src/app/common/gen/ids/Clusters.h create mode 100644 src/app/common/gen/ids/Commands.h diff --git a/examples/pump-app/pump-common/gen/encoder.cpp b/examples/pump-app/pump-common/gen/encoder.cpp index 33d3cc55fc3266..ce23472f3214d9 100644 --- a/examples/pump-app/pump-common/gen/encoder.cpp +++ b/examples/pump-app/pump-common/gen/encoder.cpp @@ -23,10 +23,14 @@ #include #include +#include +#include +#include #include #include using namespace chip; +using namespace chip::app; using namespace chip::System; using namespace chip::Encoding::LittleEndian; @@ -77,36 +81,6 @@ using namespace chip::Encoding::LittleEndian; #define EMBER_ZCL_REPORTING_DIRECTION_REPORTED 0x00 -#define ZCL_READ_ATTRIBUTES_COMMAND_ID (0x00) -#define ZCL_READ_ATTRIBUTES_RESPONSE_COMMAND_ID (0x01) -#define ZCL_WRITE_ATTRIBUTES_COMMAND_ID (0x02) -#define ZCL_WRITE_ATTRIBUTES_UNDIVIDED_COMMAND_ID (0x03) -#define ZCL_WRITE_ATTRIBUTES_RESPONSE_COMMAND_ID (0x04) -#define ZCL_WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND_ID (0x05) -#define ZCL_CONFIGURE_REPORTING_COMMAND_ID (0x06) -#define ZCL_CONFIGURE_REPORTING_RESPONSE_COMMAND_ID (0x07) -#define ZCL_READ_REPORTING_CONFIGURATION_COMMAND_ID (0x08) -#define ZCL_READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND_ID (0x09) -#define ZCL_REPORT_ATTRIBUTES_COMMAND_ID (0x0A) -#define ZCL_DEFAULT_RESPONSE_COMMAND_ID (0x0B) -#define ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID (0x0C) -#define ZCL_DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_ID (0x0D) -#define ZCL_READ_ATTRIBUTES_STRUCTURED_COMMAND_ID (0x0E) -#define ZCL_WRITE_ATTRIBUTES_STRUCTURED_COMMAND_ID (0x0F) -#define ZCL_WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND_ID (0x10) -#define ZCL_DISCOVER_COMMANDS_RECEIVED_COMMAND_ID (0x11) -#define ZCL_DISCOVER_COMMANDS_RECEIVED_RESPONSE_COMMAND_ID (0x12) -#define ZCL_DISCOVER_COMMANDS_GENERATED_COMMAND_ID (0x13) -#define ZCL_DISCOVER_COMMANDS_GENERATED_RESPONSE_COMMAND_ID (0x14) -#define ZCL_DISCOVER_ATTRIBUTES_EXTENDED_COMMAND_ID (0x15) -#define ZCL_DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE_COMMAND_ID (0x16) - -#define FLOW_MEASUREMENT_CLUSTER_ID 0x0404 - -#define PRESSURE_MEASUREMENT_CLUSTER_ID 0x0403 - -#define TEMP_MEASUREMENT_CLUSTER_ID 0x0402 - // TODO: Find a way to calculate maximum message length for clusters // https://github.com/project-chip/connectedhomeip/issues/965 constexpr uint16_t kMaxBufferSize = 1024; @@ -133,8 +107,8 @@ constexpr EndpointId kSourceEndpoint = 1; PacketBufferHandle encodeFlowMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverFlowMeasurementAttributes", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverFlowMeasurementAttributes", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -143,8 +117,11 @@ PacketBufferHandle encodeFlowMeasurementClusterDiscoverAttributes(uint8_t seqNum */ PacketBufferHandle encodeFlowMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadFlowMeasurementMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(FlowMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -152,12 +129,12 @@ PacketBufferHandle encodeFlowMeasurementClusterConfigureMeasuredValueAttribute(u uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportFlowMeasurementMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); + COMMAND_HEADER("ReportFlowMeasurementMeasuredValue", FlowMeasurement::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(FlowMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -170,8 +147,11 @@ PacketBufferHandle encodeFlowMeasurementClusterConfigureMeasuredValueAttribute(u */ PacketBufferHandle encodeFlowMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementMinMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadFlowMeasurementMinMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(FlowMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -180,8 +160,11 @@ PacketBufferHandle encodeFlowMeasurementClusterReadMinMeasuredValueAttribute(uin */ PacketBufferHandle encodeFlowMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementMaxMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadFlowMeasurementMaxMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(FlowMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -190,8 +173,11 @@ PacketBufferHandle encodeFlowMeasurementClusterReadMaxMeasuredValueAttribute(uin */ PacketBufferHandle encodeFlowMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementClusterRevision", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadFlowMeasurementClusterRevision", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -209,8 +195,8 @@ PacketBufferHandle encodeFlowMeasurementClusterReadClusterRevisionAttribute(uint PacketBufferHandle encodePressureMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -219,8 +205,11 @@ PacketBufferHandle encodePressureMeasurementClusterDiscoverAttributes(uint8_t se */ PacketBufferHandle encodePressureMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadPressureMeasurementMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PressureMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -228,12 +217,12 @@ PacketBufferHandle encodePressureMeasurementClusterConfigureMeasuredValueAttribu uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportPressureMeasurementMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); + COMMAND_HEADER("ReportPressureMeasurementMeasuredValue", PressureMeasurement::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(PressureMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -246,8 +235,11 @@ PacketBufferHandle encodePressureMeasurementClusterConfigureMeasuredValueAttribu */ PacketBufferHandle encodePressureMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PressureMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -256,8 +248,11 @@ PacketBufferHandle encodePressureMeasurementClusterReadMinMeasuredValueAttribute */ PacketBufferHandle encodePressureMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PressureMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -266,8 +261,11 @@ PacketBufferHandle encodePressureMeasurementClusterReadMaxMeasuredValueAttribute */ PacketBufferHandle encodePressureMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -285,8 +283,8 @@ PacketBufferHandle encodePressureMeasurementClusterReadClusterRevisionAttribute( PacketBufferHandle encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -295,8 +293,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TemperatureMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -305,12 +306,12 @@ PacketBufferHandle encodeTemperatureMeasurementClusterConfigureMeasuredValueAttr uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportTemperatureMeasurementMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); + COMMAND_HEADER("ReportTemperatureMeasurementMeasuredValue", TemperatureMeasurement::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(TemperatureMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -323,8 +324,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterConfigureMeasuredValueAttr */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TemperatureMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -333,8 +337,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadMinMeasuredValueAttrib */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TemperatureMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -343,7 +350,10 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadMaxMeasuredValueAttrib */ PacketBufferHandle encodeTemperatureMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } diff --git a/examples/pump-controller-app/pump-controller-common/gen/encoder.cpp b/examples/pump-controller-app/pump-controller-common/gen/encoder.cpp index 79714e791241c2..713679aaafe037 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/encoder.cpp +++ b/examples/pump-controller-app/pump-controller-common/gen/encoder.cpp @@ -23,10 +23,14 @@ #include #include +#include +#include +#include #include #include using namespace chip; +using namespace chip::app; using namespace chip::System; using namespace chip::Encoding::LittleEndian; @@ -74,53 +78,6 @@ using namespace chip::Encoding::LittleEndian; #define EMBER_ZCL_REPORTING_DIRECTION_REPORTED 0x00 -#define ZCL_READ_ATTRIBUTES_COMMAND_ID (0x00) -#define ZCL_READ_ATTRIBUTES_RESPONSE_COMMAND_ID (0x01) -#define ZCL_WRITE_ATTRIBUTES_COMMAND_ID (0x02) -#define ZCL_WRITE_ATTRIBUTES_UNDIVIDED_COMMAND_ID (0x03) -#define ZCL_WRITE_ATTRIBUTES_RESPONSE_COMMAND_ID (0x04) -#define ZCL_WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND_ID (0x05) -#define ZCL_CONFIGURE_REPORTING_COMMAND_ID (0x06) -#define ZCL_CONFIGURE_REPORTING_RESPONSE_COMMAND_ID (0x07) -#define ZCL_READ_REPORTING_CONFIGURATION_COMMAND_ID (0x08) -#define ZCL_READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND_ID (0x09) -#define ZCL_REPORT_ATTRIBUTES_COMMAND_ID (0x0A) -#define ZCL_DEFAULT_RESPONSE_COMMAND_ID (0x0B) -#define ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID (0x0C) -#define ZCL_DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_ID (0x0D) -#define ZCL_READ_ATTRIBUTES_STRUCTURED_COMMAND_ID (0x0E) -#define ZCL_WRITE_ATTRIBUTES_STRUCTURED_COMMAND_ID (0x0F) -#define ZCL_WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND_ID (0x10) -#define ZCL_DISCOVER_COMMANDS_RECEIVED_COMMAND_ID (0x11) -#define ZCL_DISCOVER_COMMANDS_RECEIVED_RESPONSE_COMMAND_ID (0x12) -#define ZCL_DISCOVER_COMMANDS_GENERATED_COMMAND_ID (0x13) -#define ZCL_DISCOVER_COMMANDS_GENERATED_RESPONSE_COMMAND_ID (0x14) -#define ZCL_DISCOVER_ATTRIBUTES_EXTENDED_COMMAND_ID (0x15) -#define ZCL_DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE_COMMAND_ID (0x16) - -#define FLOW_MEASUREMENT_CLUSTER_ID 0x0404 - -#define LEVEL_CONTROL_CLUSTER_ID 0x0008 -#define ZCL_MOVE_COMMAND_ID (0x01) -#define ZCL_MOVE_TO_LEVEL_COMMAND_ID (0x00) -#define ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID (0x04) -#define ZCL_MOVE_WITH_ON_OFF_COMMAND_ID (0x05) -#define ZCL_STEP_COMMAND_ID (0x02) -#define ZCL_STEP_WITH_ON_OFF_COMMAND_ID (0x06) -#define ZCL_STOP_COMMAND_ID (0x03) -#define ZCL_STOP_WITH_ON_OFF_COMMAND_ID (0x07) - -#define ON_OFF_CLUSTER_ID 0x0006 -#define ZCL_OFF_COMMAND_ID (0x00) -#define ZCL_ON_COMMAND_ID (0x01) -#define ZCL_TOGGLE_COMMAND_ID (0x02) - -#define PRESSURE_MEASUREMENT_CLUSTER_ID 0x0403 - -#define PUMP_CONFIG_CONTROL_CLUSTER_ID 0x0200 - -#define TEMP_MEASUREMENT_CLUSTER_ID 0x0402 - // TODO: Find a way to calculate maximum message length for clusters // https://github.com/project-chip/connectedhomeip/issues/965 constexpr uint16_t kMaxBufferSize = 1024; @@ -147,8 +104,8 @@ constexpr EndpointId kSourceEndpoint = 1; PacketBufferHandle encodeFlowMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverFlowMeasurementAttributes", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverFlowMeasurementAttributes", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -157,8 +114,11 @@ PacketBufferHandle encodeFlowMeasurementClusterDiscoverAttributes(uint8_t seqNum */ PacketBufferHandle encodeFlowMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadFlowMeasurementMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(FlowMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -166,12 +126,12 @@ PacketBufferHandle encodeFlowMeasurementClusterConfigureMeasuredValueAttribute(u uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportFlowMeasurementMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); + COMMAND_HEADER("ReportFlowMeasurementMeasuredValue", FlowMeasurement::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(FlowMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -184,8 +144,11 @@ PacketBufferHandle encodeFlowMeasurementClusterConfigureMeasuredValueAttribute(u */ PacketBufferHandle encodeFlowMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementMinMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadFlowMeasurementMinMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(FlowMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -194,8 +157,11 @@ PacketBufferHandle encodeFlowMeasurementClusterReadMinMeasuredValueAttribute(uin */ PacketBufferHandle encodeFlowMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementMaxMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadFlowMeasurementMaxMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(FlowMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -204,8 +170,11 @@ PacketBufferHandle encodeFlowMeasurementClusterReadMaxMeasuredValueAttribute(uin */ PacketBufferHandle encodeFlowMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementClusterRevision", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadFlowMeasurementClusterRevision", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -229,8 +198,8 @@ PacketBufferHandle encodeFlowMeasurementClusterReadClusterRevisionAttribute(uint PacketBufferHandle encodeLevelControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverLevelControlAttributes", LEVEL_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverLevelControlAttributes", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -239,8 +208,11 @@ PacketBufferHandle encodeLevelControlClusterDiscoverAttributes(uint8_t seqNum, E */ PacketBufferHandle encodeLevelControlClusterReadCurrentLevelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadLevelControlCurrentLevel", LEVEL_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadLevelControlCurrentLevel", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(LevelControl::Attributes::Ids::CurrentLevel); COMMAND_FOOTER(); } @@ -248,12 +220,12 @@ PacketBufferHandle encodeLevelControlClusterConfigureCurrentLevelAttribute(uint8 uint16_t minInterval, uint16_t maxInterval, uint8_t change) { - COMMAND_HEADER("ReportLevelControlCurrentLevel", LEVEL_CONTROL_CLUSTER_ID); + COMMAND_HEADER("ReportLevelControlCurrentLevel", LevelControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(LevelControl::Attributes::Ids::CurrentLevel) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -266,8 +238,11 @@ PacketBufferHandle encodeLevelControlClusterConfigureCurrentLevelAttribute(uint8 */ PacketBufferHandle encodeLevelControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadLevelControlClusterRevision", LEVEL_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadLevelControlClusterRevision", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -286,8 +261,8 @@ PacketBufferHandle encodeLevelControlClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeOnOffClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverOnOffAttributes", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverOnOffAttributes", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -296,8 +271,11 @@ PacketBufferHandle encodeOnOffClusterDiscoverAttributes(uint8_t seqNum, Endpoint */ PacketBufferHandle encodeOnOffClusterReadOnOffAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOnOffOnOff", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadOnOffOnOff", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(OnOff::Attributes::Ids::OnOff); COMMAND_FOOTER(); } @@ -306,8 +284,11 @@ PacketBufferHandle encodeOnOffClusterReadOnOffAttribute(uint8_t seqNum, Endpoint */ PacketBufferHandle encodeOnOffClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOnOffClusterRevision", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadOnOffClusterRevision", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -325,8 +306,8 @@ PacketBufferHandle encodeOnOffClusterReadClusterRevisionAttribute(uint8_t seqNum PacketBufferHandle encodePressureMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -335,8 +316,11 @@ PacketBufferHandle encodePressureMeasurementClusterDiscoverAttributes(uint8_t se */ PacketBufferHandle encodePressureMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadPressureMeasurementMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PressureMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -344,12 +328,12 @@ PacketBufferHandle encodePressureMeasurementClusterConfigureMeasuredValueAttribu uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportPressureMeasurementMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); + COMMAND_HEADER("ReportPressureMeasurementMeasuredValue", PressureMeasurement::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(PressureMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -362,8 +346,11 @@ PacketBufferHandle encodePressureMeasurementClusterConfigureMeasuredValueAttribu */ PacketBufferHandle encodePressureMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PressureMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -372,8 +359,11 @@ PacketBufferHandle encodePressureMeasurementClusterReadMinMeasuredValueAttribute */ PacketBufferHandle encodePressureMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PressureMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -382,8 +372,11 @@ PacketBufferHandle encodePressureMeasurementClusterReadMaxMeasuredValueAttribute */ PacketBufferHandle encodePressureMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -405,8 +398,8 @@ PacketBufferHandle encodePressureMeasurementClusterReadClusterRevisionAttribute( PacketBufferHandle encodePumpConfigurationAndControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverPumpConfigurationAndControlAttributes", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPumpConfigurationAndControlAttributes", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -415,8 +408,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterDiscoverAttributes(ui */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxPressureAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlMaxPressure", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxPressure", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::MaxPressure); COMMAND_FOOTER(); } @@ -425,8 +421,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxPressureAttrib */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxSpeedAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlMaxSpeed", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxSpeed", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::MaxSpeed); COMMAND_FOOTER(); } @@ -435,8 +434,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxSpeedAttribute */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxFlowAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlMaxFlow", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxFlow", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::MaxFlow); COMMAND_FOOTER(); } @@ -446,8 +448,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxFlowAttribute( PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveOperationModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveOperationMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveOperationMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::EffectiveOperationMode); COMMAND_FOOTER(); } @@ -457,8 +462,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveOperatio PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveControlModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveControlMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0012); + COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveControlMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::EffectiveControlMode); COMMAND_FOOTER(); } @@ -467,8 +475,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveControlM */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadCapacityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlCapacity", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0013); + COMMAND_HEADER("ReadPumpConfigurationAndControlCapacity", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::Capacity); COMMAND_FOOTER(); } @@ -477,12 +488,12 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterConfigureCapacityAttr uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportPumpConfigurationAndControlCapacity", PUMP_CONFIG_CONTROL_CLUSTER_ID); + COMMAND_HEADER("ReportPumpConfigurationAndControlCapacity", PumpConfigurationAndControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0013) + .Put16(PumpConfigurationAndControl::Attributes::Ids::Capacity) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -496,8 +507,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterConfigureCapacityAttr PacketBufferHandle encodePumpConfigurationAndControlClusterReadOperationModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlOperationMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0020); + COMMAND_HEADER("ReadPumpConfigurationAndControlOperationMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::OperationMode); COMMAND_FOOTER(); } @@ -505,11 +519,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterWriteOperationModeAtt EndpointId destinationEndpoint, uint8_t operationMode) { - COMMAND_HEADER("WritePumpConfigurationAndControlOperationMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WritePumpConfigurationAndControlOperationMode", PumpConfigurationAndControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0020) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::OperationMode) .Put8(48) .Put8(static_cast(operationMode)); COMMAND_FOOTER(); @@ -521,8 +535,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterWriteOperationModeAtt PacketBufferHandle encodePumpConfigurationAndControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlClusterRevision", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadPumpConfigurationAndControlClusterRevision", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -540,8 +557,8 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadClusterRevisionAt PacketBufferHandle encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -550,8 +567,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TemperatureMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -560,12 +580,12 @@ PacketBufferHandle encodeTemperatureMeasurementClusterConfigureMeasuredValueAttr uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportTemperatureMeasurementMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); + COMMAND_HEADER("ReportTemperatureMeasurementMeasuredValue", TemperatureMeasurement::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(TemperatureMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -578,8 +598,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterConfigureMeasuredValueAttr */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TemperatureMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -588,8 +611,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadMinMeasuredValueAttrib */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TemperatureMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -598,7 +624,10 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadMaxMeasuredValueAttrib */ PacketBufferHandle encodeTemperatureMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } diff --git a/src/app/common/gen/ids/Attributes.h b/src/app/common/gen/ids/Attributes.h new file mode 100644 index 00000000000000..cbcacde718a5de --- /dev/null +++ b/src/app/common/gen/ids/Attributes.h @@ -0,0 +1,1569 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#pragma once + +namespace chip { +namespace app { + +namespace Globals { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId FeatureMap = 0xFFFC; +static constexpr chip::AttributeId ClusterRevision = 0xFFFD; +} // namespace Ids +} // namespace Attributes +} // namespace Globals + +namespace PowerConfiguration { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MainsVoltage = 0x0000; +static constexpr chip::AttributeId MainsFrequency = 0x0001; +static constexpr chip::AttributeId MainsAlarmMask = 0x0010; +static constexpr chip::AttributeId MainsVoltageMinThreshold = 0x0011; +static constexpr chip::AttributeId MainsVoltageMaxThreshold = 0x0012; +static constexpr chip::AttributeId MainsVoltageDwellTrip = 0x0013; +static constexpr chip::AttributeId BatteryVoltage = 0x0020; +static constexpr chip::AttributeId BatteryPercentageRemaining = 0x0021; +static constexpr chip::AttributeId BatteryManufacturer = 0x0030; +static constexpr chip::AttributeId BatterySize = 0x0031; +static constexpr chip::AttributeId BatteryAhrRating = 0x0032; +static constexpr chip::AttributeId BatteryQuantity = 0x0033; +static constexpr chip::AttributeId BatteryRatedVoltage = 0x0034; +static constexpr chip::AttributeId BatteryAlarmMask = 0x0035; +static constexpr chip::AttributeId BatteryVoltageMinThreshold = 0x0036; +static constexpr chip::AttributeId BatteryVoltageThreshold1 = 0x0037; +static constexpr chip::AttributeId BatteryVoltageThreshold2 = 0x0038; +static constexpr chip::AttributeId BatteryVoltageThreshold3 = 0x0039; +static constexpr chip::AttributeId BatteryPercentageMinThreshold = 0x003A; +static constexpr chip::AttributeId BatteryPercentageThreshold1 = 0x003B; +static constexpr chip::AttributeId BatteryPercentageThreshold2 = 0x003C; +static constexpr chip::AttributeId BatteryPercentageThreshold3 = 0x003D; +static constexpr chip::AttributeId BatteryAlarmState = 0x003E; +static constexpr chip::AttributeId Battery2Voltage = 0x0040; +static constexpr chip::AttributeId Battery2PercentageRemaining = 0x0041; +static constexpr chip::AttributeId Battery2Manufacturer = 0x0050; +static constexpr chip::AttributeId Battery2Size = 0x0051; +static constexpr chip::AttributeId Battery2AhrRating = 0x0052; +static constexpr chip::AttributeId Battery2Quantity = 0x0053; +static constexpr chip::AttributeId Battery2RatedVoltage = 0x0054; +static constexpr chip::AttributeId Battery2AlarmMask = 0x0055; +static constexpr chip::AttributeId Battery2VoltageMinThreshold = 0x0056; +static constexpr chip::AttributeId Battery2VoltageThreshold1 = 0x0057; +static constexpr chip::AttributeId Battery2VoltageThreshold2 = 0x0058; +static constexpr chip::AttributeId Battery2VoltageThreshold3 = 0x0059; +static constexpr chip::AttributeId Battery2PercentageMinThreshold = 0x005A; +static constexpr chip::AttributeId Battery2PercentageThreshold1 = 0x005B; +static constexpr chip::AttributeId Battery2PercentageThreshold2 = 0x005C; +static constexpr chip::AttributeId Battery2PercentageThreshold3 = 0x005D; +static constexpr chip::AttributeId Battery2AlarmState = 0x005E; +static constexpr chip::AttributeId Battery3Voltage = 0x0060; +static constexpr chip::AttributeId Battery3PercentageRemaining = 0x0061; +static constexpr chip::AttributeId Battery3Manufacturer = 0x0070; +static constexpr chip::AttributeId Battery3Size = 0x0071; +static constexpr chip::AttributeId Battery3AhrRating = 0x0072; +static constexpr chip::AttributeId Battery3Quantity = 0x0073; +static constexpr chip::AttributeId Battery3RatedVoltage = 0x0074; +static constexpr chip::AttributeId Battery3AlarmMask = 0x0075; +static constexpr chip::AttributeId Battery3VoltageMinThreshold = 0x0076; +static constexpr chip::AttributeId Battery3VoltageThreshold1 = 0x0077; +static constexpr chip::AttributeId Battery3VoltageThreshold2 = 0x0078; +static constexpr chip::AttributeId Battery3VoltageThreshold3 = 0x0079; +static constexpr chip::AttributeId Battery3PercentageMinThreshold = 0x007A; +static constexpr chip::AttributeId Battery3PercentageThreshold1 = 0x007B; +static constexpr chip::AttributeId Battery3PercentageThreshold2 = 0x007C; +static constexpr chip::AttributeId Battery3PercentageThreshold3 = 0x007D; +static constexpr chip::AttributeId Battery3AlarmState = 0x007E; +} // namespace Ids +} // namespace Attributes +} // namespace PowerConfiguration + +namespace DeviceTemperatureConfiguration { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId CurrentTemperature = 0x0000; +static constexpr chip::AttributeId MinTempExperienced = 0x0001; +static constexpr chip::AttributeId MaxTempExperienced = 0x0002; +static constexpr chip::AttributeId OverTempTotalDwell = 0x0003; +static constexpr chip::AttributeId DeviceTempAlarmMask = 0x0010; +static constexpr chip::AttributeId LowTempThreshold = 0x0011; +static constexpr chip::AttributeId HighTempThreshold = 0x0012; +static constexpr chip::AttributeId LowTempDwellTripPoint = 0x0013; +static constexpr chip::AttributeId HighTempDwellTripPoint = 0x0014; +} // namespace Ids +} // namespace Attributes +} // namespace DeviceTemperatureConfiguration + +namespace Identify { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId IdentifyTime = 0x0000; +static constexpr chip::AttributeId CommissionState = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace Identify + +namespace Groups { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId NameSupport = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace Groups + +namespace Scenes { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId SceneCount = 0x0000; +static constexpr chip::AttributeId CurrentScene = 0x0001; +static constexpr chip::AttributeId CurrentGroup = 0x0002; +static constexpr chip::AttributeId SceneValid = 0x0003; +static constexpr chip::AttributeId NameSupport = 0x0004; +static constexpr chip::AttributeId LastConfiguredBy = 0x0005; +} // namespace Ids +} // namespace Attributes +} // namespace Scenes + +namespace OnOff { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId OnOff = 0x0000; +static constexpr chip::AttributeId SampleMfgSpecificAttribute0x00000x1002 = 0x0000; +static constexpr chip::AttributeId SampleMfgSpecificAttribute0x00000x1049 = 0x0000; +static constexpr chip::AttributeId SampleMfgSpecificAttribute0x00010x1002 = 0x0001; +static constexpr chip::AttributeId SampleMfgSpecificAttribute0x00010x1040 = 0x0001; +static constexpr chip::AttributeId GlobalSceneControl = 0x4000; +static constexpr chip::AttributeId OnTime = 0x4001; +static constexpr chip::AttributeId OffWaitTime = 0x4002; +static constexpr chip::AttributeId StartUpOnOff = 0x4003; +} // namespace Ids +} // namespace Attributes +} // namespace OnOff + +namespace OnOffSwitchConfiguration { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId SwitchType = 0x0000; +static constexpr chip::AttributeId SwitchActions = 0x0010; +} // namespace Ids +} // namespace Attributes +} // namespace OnOffSwitchConfiguration + +namespace LevelControl { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId CurrentLevel = 0x0000; +static constexpr chip::AttributeId RemainingTime = 0x0001; +static constexpr chip::AttributeId Options = 0x000F; +static constexpr chip::AttributeId OnOffTransitionTime = 0x0010; +static constexpr chip::AttributeId OnLevel = 0x0011; +static constexpr chip::AttributeId OnTransitionTime = 0x0012; +static constexpr chip::AttributeId OffTransitionTime = 0x0013; +static constexpr chip::AttributeId DefaultMoveRate = 0x0014; +static constexpr chip::AttributeId StartUpCurrentLevel = 0x4000; +} // namespace Ids +} // namespace Attributes +} // namespace LevelControl + +namespace Alarms { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId AlarmCount = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace Alarms + +namespace Time { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId Time = 0x0000; +static constexpr chip::AttributeId TimeStatus = 0x0001; +static constexpr chip::AttributeId TimeZone = 0x0002; +static constexpr chip::AttributeId DstStart = 0x0003; +static constexpr chip::AttributeId DstEnd = 0x0004; +static constexpr chip::AttributeId DstShift = 0x0005; +static constexpr chip::AttributeId StandardTime = 0x0006; +static constexpr chip::AttributeId LocalTime = 0x0007; +static constexpr chip::AttributeId LastSetTime = 0x0008; +static constexpr chip::AttributeId ValidUntilTime = 0x0009; +} // namespace Ids +} // namespace Attributes +} // namespace Time + +namespace BinaryInputBasic { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId ActiveText = 0x0004; +static constexpr chip::AttributeId Description = 0x001C; +static constexpr chip::AttributeId InactiveText = 0x002E; +static constexpr chip::AttributeId OutOfService = 0x0051; +static constexpr chip::AttributeId Polarity = 0x0054; +static constexpr chip::AttributeId PresentValue = 0x0055; +static constexpr chip::AttributeId Reliability = 0x0067; +static constexpr chip::AttributeId StatusFlags = 0x006F; +static constexpr chip::AttributeId ApplicationType = 0x0100; +} // namespace Ids +} // namespace Attributes +} // namespace BinaryInputBasic + +namespace PowerProfile { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId TotalProfileNum = 0x0000; +static constexpr chip::AttributeId MultipleScheduling = 0x0001; +static constexpr chip::AttributeId EnergyFormatting = 0x0002; +static constexpr chip::AttributeId EnergyRemote = 0x0003; +static constexpr chip::AttributeId ScheduleMode = 0x0004; +} // namespace Ids +} // namespace Attributes +} // namespace PowerProfile + +namespace ApplianceControl { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId StartTime = 0x0000; +static constexpr chip::AttributeId FinishTime = 0x0001; +static constexpr chip::AttributeId RemainingTime = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace ApplianceControl + +namespace Descriptor { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId DeviceList = 0x0000; +static constexpr chip::AttributeId ServerList = 0x0001; +static constexpr chip::AttributeId ClientList = 0x0002; +static constexpr chip::AttributeId PartsList = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace Descriptor + +namespace PollControl { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId CheckInInterval = 0x0000; +static constexpr chip::AttributeId LongPollInterval = 0x0001; +static constexpr chip::AttributeId ShortPollInterval = 0x0002; +static constexpr chip::AttributeId FastPollTimeout = 0x0003; +static constexpr chip::AttributeId CheckInIntervalMin = 0x0004; +static constexpr chip::AttributeId LongPollIntervalMin = 0x0005; +static constexpr chip::AttributeId FastPollTimeoutMax = 0x0006; +} // namespace Ids +} // namespace Attributes +} // namespace PollControl + +namespace Basic { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId InteractionModelVersion = 0x0000; +static constexpr chip::AttributeId VendorName = 0x0001; +static constexpr chip::AttributeId VendorID = 0x0002; +static constexpr chip::AttributeId ProductName = 0x0003; +static constexpr chip::AttributeId ProductID = 0x0004; +static constexpr chip::AttributeId UserLabel = 0x0005; +static constexpr chip::AttributeId Location = 0x0006; +static constexpr chip::AttributeId HardwareVersion = 0x0007; +static constexpr chip::AttributeId HardwareVersionString = 0x0008; +static constexpr chip::AttributeId SoftwareVersion = 0x0009; +static constexpr chip::AttributeId SoftwareVersionString = 0x000A; +static constexpr chip::AttributeId ManufacturingDate = 0x000B; +static constexpr chip::AttributeId PartNumber = 0x000C; +static constexpr chip::AttributeId ProductURL = 0x000D; +static constexpr chip::AttributeId ProductLabel = 0x000E; +static constexpr chip::AttributeId SerialNumber = 0x000F; +static constexpr chip::AttributeId LocalConfigDisabled = 0x0010; +static constexpr chip::AttributeId Reachable = 0x0011; +} // namespace Ids +} // namespace Attributes +} // namespace Basic + +namespace GeneralCommissioning { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId FabricId = 0x0000; +static constexpr chip::AttributeId Breadcrumb = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace GeneralCommissioning + +namespace GeneralDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId NetworkInterfaces = 0x0000; +static constexpr chip::AttributeId RebootCount = 0x0001; +static constexpr chip::AttributeId UpTime = 0x0002; +static constexpr chip::AttributeId TotalOperationalHours = 0x0003; +static constexpr chip::AttributeId BootReasons = 0x0004; +static constexpr chip::AttributeId ActiveHardwareFaults = 0x0005; +static constexpr chip::AttributeId ActiveRadioFaults = 0x0006; +static constexpr chip::AttributeId ActiveNetworkFaults = 0x0007; +} // namespace Ids +} // namespace Attributes +} // namespace GeneralDiagnostics + +namespace SoftwareDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId ThreadMetrics = 0x0000; +static constexpr chip::AttributeId CurrentHeapFree = 0x0001; +static constexpr chip::AttributeId CurrentHeapUsed = 0x0002; +static constexpr chip::AttributeId CurrentHeapHighWatermark = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace SoftwareDiagnostics + +namespace ThreadNetworkDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId Channel = 0x0000; +static constexpr chip::AttributeId RoutingRole = 0x0001; +static constexpr chip::AttributeId NetworkName = 0x0002; +static constexpr chip::AttributeId PanId = 0x0003; +static constexpr chip::AttributeId ExtendedPanId = 0x0004; +static constexpr chip::AttributeId MeshLocalPrefix = 0x0005; +static constexpr chip::AttributeId OverrunCount = 0x0006; +static constexpr chip::AttributeId NeighborTableList = 0x0007; +static constexpr chip::AttributeId RouteTableList = 0x0008; +static constexpr chip::AttributeId PartitionId = 0x0009; +static constexpr chip::AttributeId Weighting = 0x000A; +static constexpr chip::AttributeId DataVersion = 0x000B; +static constexpr chip::AttributeId StableDataVersion = 0x000C; +static constexpr chip::AttributeId LeaderRouterId = 0x000D; +static constexpr chip::AttributeId DetachedRoleCount = 0x000E; +static constexpr chip::AttributeId ChildRoleCount = 0x000F; +static constexpr chip::AttributeId RouterRoleCount = 0x0010; +static constexpr chip::AttributeId LeaderRoleCount = 0x0011; +static constexpr chip::AttributeId AttachAttemptCount = 0x0012; +static constexpr chip::AttributeId PartitionIdChangeCount = 0x0013; +static constexpr chip::AttributeId BetterPartitionAttachAttemptCount = 0x0014; +static constexpr chip::AttributeId ParentChangeCount = 0x0015; +static constexpr chip::AttributeId TxTotalCount = 0x0016; +static constexpr chip::AttributeId TxUnicastCount = 0x0017; +static constexpr chip::AttributeId TxBroadcastCount = 0x0018; +static constexpr chip::AttributeId TxAckRequestedCount = 0x0019; +static constexpr chip::AttributeId TxAckedCount = 0x001A; +static constexpr chip::AttributeId TxNoAckRequestedCount = 0x001B; +static constexpr chip::AttributeId TxDataCount = 0x001C; +static constexpr chip::AttributeId TxDataPollCount = 0x001D; +static constexpr chip::AttributeId TxBeaconCount = 0x001E; +static constexpr chip::AttributeId TxBeaconRequestCount = 0x001F; +static constexpr chip::AttributeId TxOtherCount = 0x0020; +static constexpr chip::AttributeId TxRetryCount = 0x0021; +static constexpr chip::AttributeId TxDirectMaxRetryExpiryCount = 0x0022; +static constexpr chip::AttributeId TxIndirectMaxRetryExpiryCount = 0x0023; +static constexpr chip::AttributeId TxErrCcaCount = 0x0024; +static constexpr chip::AttributeId TxErrAbortCount = 0x0025; +static constexpr chip::AttributeId TxErrBusyChannelCount = 0x0026; +static constexpr chip::AttributeId RxTotalCount = 0x0027; +static constexpr chip::AttributeId RxUnicastCount = 0x0028; +static constexpr chip::AttributeId RxBroadcastCount = 0x0029; +static constexpr chip::AttributeId RxDataCount = 0x002A; +static constexpr chip::AttributeId RxDataPollCount = 0x002B; +static constexpr chip::AttributeId RxBeaconCount = 0x002C; +static constexpr chip::AttributeId RxBeaconRequestCount = 0x002D; +static constexpr chip::AttributeId RxOtherCount = 0x002E; +static constexpr chip::AttributeId RxAddressFilteredCount = 0x002F; +static constexpr chip::AttributeId RxDestAddrFilteredCount = 0x0030; +static constexpr chip::AttributeId RxDuplicatedCount = 0x0031; +static constexpr chip::AttributeId RxErrNoFrameCount = 0x0032; +static constexpr chip::AttributeId RxErrUnknownNeighborCount = 0x0033; +static constexpr chip::AttributeId RxErrInvalidSrcAddrCount = 0x0034; +static constexpr chip::AttributeId RxErrSecCount = 0x0035; +static constexpr chip::AttributeId RxErrFcsCount = 0x0036; +static constexpr chip::AttributeId RxErrOtherCount = 0x0037; +static constexpr chip::AttributeId ActiveTimestamp = 0x0038; +static constexpr chip::AttributeId PendingTimestamp = 0x0039; +static constexpr chip::AttributeId Delay = 0x003A; +static constexpr chip::AttributeId SecurityPolicy = 0x003B; +static constexpr chip::AttributeId ChannelMask = 0x003C; +static constexpr chip::AttributeId OperationalDatasetComponents = 0x003D; +static constexpr chip::AttributeId ActiveNetworkFaultsList = 0x003E; +} // namespace Ids +} // namespace Attributes +} // namespace ThreadNetworkDiagnostics + +namespace WiFiNetworkDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId Bssid = 0x0000; +static constexpr chip::AttributeId SecurityType = 0x0001; +static constexpr chip::AttributeId WiFiVersion = 0x0002; +static constexpr chip::AttributeId ChannelNumber = 0x0003; +static constexpr chip::AttributeId Rssi = 0x0004; +static constexpr chip::AttributeId BeaconLostCount = 0x0005; +static constexpr chip::AttributeId BeaconRxCount = 0x0006; +static constexpr chip::AttributeId PacketMulticastRxCount = 0x0007; +static constexpr chip::AttributeId PacketMulticastTxCount = 0x0008; +static constexpr chip::AttributeId PacketUnicastRxCount = 0x0009; +static constexpr chip::AttributeId PacketUnicastTxCount = 0x000A; +static constexpr chip::AttributeId CurrentMaxRate = 0x000B; +static constexpr chip::AttributeId OverrunCount = 0x000C; +} // namespace Ids +} // namespace Attributes +} // namespace WiFiNetworkDiagnostics + +namespace EthernetNetworkDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId PHYRate = 0x0000; +static constexpr chip::AttributeId FullDuplex = 0x0001; +static constexpr chip::AttributeId PacketRxCount = 0x0002; +static constexpr chip::AttributeId PacketTxCount = 0x0003; +static constexpr chip::AttributeId TxErrCount = 0x0004; +static constexpr chip::AttributeId CollisionCount = 0x0005; +static constexpr chip::AttributeId OverrunCount = 0x0006; +static constexpr chip::AttributeId CarrierDetect = 0x0007; +static constexpr chip::AttributeId TimeSinceReset = 0x0008; +} // namespace Ids +} // namespace Attributes +} // namespace EthernetNetworkDiagnostics + +namespace BridgedDeviceBasic { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId VendorName = 0x0001; +static constexpr chip::AttributeId VendorID = 0x0002; +static constexpr chip::AttributeId ProductName = 0x0003; +static constexpr chip::AttributeId UserLabel = 0x0005; +static constexpr chip::AttributeId HardwareVersion = 0x0007; +static constexpr chip::AttributeId HardwareVersionString = 0x0008; +static constexpr chip::AttributeId SoftwareVersion = 0x0009; +static constexpr chip::AttributeId SoftwareVersionString = 0x000A; +static constexpr chip::AttributeId ManufacturingDate = 0x000B; +static constexpr chip::AttributeId PartNumber = 0x000C; +static constexpr chip::AttributeId ProductURL = 0x000D; +static constexpr chip::AttributeId ProductLabel = 0x000E; +static constexpr chip::AttributeId SerialNumber = 0x000F; +static constexpr chip::AttributeId Reachable = 0x0011; +} // namespace Ids +} // namespace Attributes +} // namespace BridgedDeviceBasic + +namespace Switch { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId NumberOfPositions = 0x0000; +static constexpr chip::AttributeId CurrentPosition = 0x0001; +static constexpr chip::AttributeId MultiPressMax = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace Switch + +namespace OperationalCredentials { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId FabricsList = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace OperationalCredentials + +namespace FixedLabel { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId LabelList = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace FixedLabel + +namespace ShadeConfiguration { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId PhysicalClosedLimit = 0x0000; +static constexpr chip::AttributeId MotorStepSize = 0x0001; +static constexpr chip::AttributeId Status = 0x0002; +static constexpr chip::AttributeId ClosedLimit = 0x0010; +static constexpr chip::AttributeId Mode = 0x0011; +} // namespace Ids +} // namespace Attributes +} // namespace ShadeConfiguration + +namespace DoorLock { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId LockState = 0x0000; +static constexpr chip::AttributeId LockType = 0x0001; +static constexpr chip::AttributeId ActuatorEnabled = 0x0002; +static constexpr chip::AttributeId DoorState = 0x0003; +static constexpr chip::AttributeId DoorOpenEvents = 0x0004; +static constexpr chip::AttributeId DoorClosedEvents = 0x0005; +static constexpr chip::AttributeId OpenPeriod = 0x0006; +static constexpr chip::AttributeId NumLockRecordsSupported = 0x0010; +static constexpr chip::AttributeId NumTotalUsersSupported = 0x0011; +static constexpr chip::AttributeId NumPinUsersSupported = 0x0012; +static constexpr chip::AttributeId NumRfidUsersSupported = 0x0013; +static constexpr chip::AttributeId NumWeekdaySchedulesSupportedPerUser = 0x0014; +static constexpr chip::AttributeId NumYeardaySchedulesSupportedPerUser = 0x0015; +static constexpr chip::AttributeId NumHolidaySchedulesSupportedPerUser = 0x0016; +static constexpr chip::AttributeId MaxPinLength = 0x0017; +static constexpr chip::AttributeId MinPinLength = 0x0018; +static constexpr chip::AttributeId MaxRfidCodeLength = 0x0019; +static constexpr chip::AttributeId MinRfidCodeLength = 0x001A; +static constexpr chip::AttributeId EnableLogging = 0x0020; +static constexpr chip::AttributeId Language = 0x0021; +static constexpr chip::AttributeId LedSettings = 0x0022; +static constexpr chip::AttributeId AutoRelockTime = 0x0023; +static constexpr chip::AttributeId SoundVolume = 0x0024; +static constexpr chip::AttributeId OperatingMode = 0x0025; +static constexpr chip::AttributeId SupportedOperatingModes = 0x0026; +static constexpr chip::AttributeId DefaultConfigurationRegister = 0x0027; +static constexpr chip::AttributeId EnableLocalProgramming = 0x0028; +static constexpr chip::AttributeId EnableOneTouchLocking = 0x0029; +static constexpr chip::AttributeId EnableInsideStatusLed = 0x002A; +static constexpr chip::AttributeId EnablePrivacyModeButton = 0x002B; +static constexpr chip::AttributeId WrongCodeEntryLimit = 0x0030; +static constexpr chip::AttributeId UserCodeTemporaryDisableTime = 0x0031; +static constexpr chip::AttributeId SendPinOverTheAir = 0x0032; +static constexpr chip::AttributeId RequirePinForRfOperation = 0x0033; +static constexpr chip::AttributeId ZigbeeSecurityLevel = 0x0034; +static constexpr chip::AttributeId AlarmMask = 0x0040; +static constexpr chip::AttributeId KeypadOperationEventMask = 0x0041; +static constexpr chip::AttributeId RfOperationEventMask = 0x0042; +static constexpr chip::AttributeId ManualOperationEventMask = 0x0043; +static constexpr chip::AttributeId RfidOperationEventMask = 0x0044; +static constexpr chip::AttributeId KeypadProgrammingEventMask = 0x0045; +static constexpr chip::AttributeId RfProgrammingEventMask = 0x0046; +static constexpr chip::AttributeId RfidProgrammingEventMask = 0x0047; +} // namespace Ids +} // namespace Attributes +} // namespace DoorLock + +namespace WindowCovering { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId Type = 0x0000; +static constexpr chip::AttributeId PhysicalClosedLimitLift = 0x0001; +static constexpr chip::AttributeId PhysicalClosedLimitTilt = 0x0002; +static constexpr chip::AttributeId CurrentPositionLift = 0x0003; +static constexpr chip::AttributeId CurrentPositionTilt = 0x0004; +static constexpr chip::AttributeId NumberOfActuationsLift = 0x0005; +static constexpr chip::AttributeId NumberOfActuationsTilt = 0x0006; +static constexpr chip::AttributeId ConfigStatus = 0x0007; +static constexpr chip::AttributeId CurrentPositionLiftPercentage = 0x0008; +static constexpr chip::AttributeId CurrentPositionTiltPercentage = 0x0009; +static constexpr chip::AttributeId OperationalStatus = 0x000A; +static constexpr chip::AttributeId TargetPositionLiftPercent100ths = 0x000B; +static constexpr chip::AttributeId TargetPositionTiltPercent100ths = 0x000C; +static constexpr chip::AttributeId EndProductType = 0x000D; +static constexpr chip::AttributeId CurrentPositionLiftPercent100ths = 0x000E; +static constexpr chip::AttributeId CurrentPositionTiltPercent100ths = 0x000F; +static constexpr chip::AttributeId InstalledOpenLimitLift = 0x0010; +static constexpr chip::AttributeId InstalledClosedLimitLift = 0x0011; +static constexpr chip::AttributeId InstalledOpenLimitTilt = 0x0012; +static constexpr chip::AttributeId InstalledClosedLimitTilt = 0x0013; +static constexpr chip::AttributeId VelocityLift = 0x0014; +static constexpr chip::AttributeId AccelerationTimeLift = 0x0015; +static constexpr chip::AttributeId DecelerationTimeLift = 0x0016; +static constexpr chip::AttributeId Mode = 0x0017; +static constexpr chip::AttributeId IntermediateSetpointsLift = 0x0018; +static constexpr chip::AttributeId IntermediateSetpointsTilt = 0x0019; +static constexpr chip::AttributeId SafetyStatus = 0x001A; +} // namespace Ids +} // namespace Attributes +} // namespace WindowCovering + +namespace BarrierControl { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId BarrierMovingState = 0x0001; +static constexpr chip::AttributeId BarrierSafetyStatus = 0x0002; +static constexpr chip::AttributeId BarrierCapabilities = 0x0003; +static constexpr chip::AttributeId BarrierOpenEvents = 0x0004; +static constexpr chip::AttributeId BarrierCloseEvents = 0x0005; +static constexpr chip::AttributeId BarrierCommandOpenEvents = 0x0006; +static constexpr chip::AttributeId BarrierCommandCloseEvents = 0x0007; +static constexpr chip::AttributeId BarrierOpenPeriod = 0x0008; +static constexpr chip::AttributeId BarrierClosePeriod = 0x0009; +static constexpr chip::AttributeId BarrierPosition = 0x000A; +} // namespace Ids +} // namespace Attributes +} // namespace BarrierControl + +namespace PumpConfigurationAndControl { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MaxPressure = 0x0000; +static constexpr chip::AttributeId MaxSpeed = 0x0001; +static constexpr chip::AttributeId MaxFlow = 0x0002; +static constexpr chip::AttributeId MinConstPressure = 0x0003; +static constexpr chip::AttributeId MaxConstPressure = 0x0004; +static constexpr chip::AttributeId MinCompPressure = 0x0005; +static constexpr chip::AttributeId MaxCompPressure = 0x0006; +static constexpr chip::AttributeId MinConstSpeed = 0x0007; +static constexpr chip::AttributeId MaxConstSpeed = 0x0008; +static constexpr chip::AttributeId MinConstFlow = 0x0009; +static constexpr chip::AttributeId MaxConstFlow = 0x000A; +static constexpr chip::AttributeId MinConstTemp = 0x000B; +static constexpr chip::AttributeId MaxConstTemp = 0x000C; +static constexpr chip::AttributeId PumpStatus = 0x0010; +static constexpr chip::AttributeId EffectiveOperationMode = 0x0011; +static constexpr chip::AttributeId EffectiveControlMode = 0x0012; +static constexpr chip::AttributeId Capacity = 0x0013; +static constexpr chip::AttributeId Speed = 0x0014; +static constexpr chip::AttributeId LifetimeRunningHours = 0x0015; +static constexpr chip::AttributeId Power = 0x0016; +static constexpr chip::AttributeId LifetimeEnergyConsumed = 0x0017; +static constexpr chip::AttributeId OperationMode = 0x0020; +static constexpr chip::AttributeId ControlMode = 0x0021; +static constexpr chip::AttributeId AlarmMask = 0x0022; +} // namespace Ids +} // namespace Attributes +} // namespace PumpConfigurationAndControl + +namespace Thermostat { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId LocalTemperature = 0x0000; +static constexpr chip::AttributeId OutdoorTemperature = 0x0001; +static constexpr chip::AttributeId Occupancy = 0x0002; +static constexpr chip::AttributeId AbsMinHeatSetpointLimit = 0x0003; +static constexpr chip::AttributeId AbsMaxHeatSetpointLimit = 0x0004; +static constexpr chip::AttributeId AbsMinCoolSetpointLimit = 0x0005; +static constexpr chip::AttributeId AbsMaxCoolSetpointLimit = 0x0006; +static constexpr chip::AttributeId PiCoolingDemand = 0x0007; +static constexpr chip::AttributeId PiHeatingDemand = 0x0008; +static constexpr chip::AttributeId HvacSystemTypeConfiguration = 0x0009; +static constexpr chip::AttributeId LocalTemperatureCalibration = 0x0010; +static constexpr chip::AttributeId OccupiedCoolingSetpoint = 0x0011; +static constexpr chip::AttributeId OccupiedHeatingSetpoint = 0x0012; +static constexpr chip::AttributeId UnoccupiedCoolingSetpoint = 0x0013; +static constexpr chip::AttributeId UnoccupiedHeatingSetpoint = 0x0014; +static constexpr chip::AttributeId MinHeatSetpointLimit = 0x0015; +static constexpr chip::AttributeId MaxHeatSetpointLimit = 0x0016; +static constexpr chip::AttributeId MinCoolSetpointLimit = 0x0017; +static constexpr chip::AttributeId MaxCoolSetpointLimit = 0x0018; +static constexpr chip::AttributeId MinSetpointDeadBand = 0x0019; +static constexpr chip::AttributeId RemoteSensing = 0x001A; +static constexpr chip::AttributeId ControlSequenceOfOperation = 0x001B; +static constexpr chip::AttributeId SystemMode = 0x001C; +static constexpr chip::AttributeId AlarmMask = 0x001D; +static constexpr chip::AttributeId ThermostatRunningMode = 0x001E; +static constexpr chip::AttributeId StartOfWeek = 0x0020; +static constexpr chip::AttributeId NumberOfWeeklyTransitions = 0x0021; +static constexpr chip::AttributeId NumberOfDailyTransitions = 0x0022; +static constexpr chip::AttributeId TemperatureSetpointHold = 0x0023; +static constexpr chip::AttributeId TemperatureSetpointHoldDuration = 0x0024; +static constexpr chip::AttributeId ThermostatProgrammingOperationMode = 0x0025; +static constexpr chip::AttributeId HvacRelayState = 0x0029; +static constexpr chip::AttributeId SetpointChangeSource = 0x0030; +static constexpr chip::AttributeId SetpointChangeAmount = 0x0031; +static constexpr chip::AttributeId SetpointChangeSourceTimestamp = 0x0032; +static constexpr chip::AttributeId AcType = 0x0040; +static constexpr chip::AttributeId AcCapacity = 0x0041; +static constexpr chip::AttributeId AcRefrigerantType = 0x0042; +static constexpr chip::AttributeId AcCompressor = 0x0043; +static constexpr chip::AttributeId AcErrorCode = 0x0044; +static constexpr chip::AttributeId AcLouverPosition = 0x0045; +static constexpr chip::AttributeId AcCoilTemperature = 0x0046; +static constexpr chip::AttributeId AcCapacityFormat = 0x0047; +} // namespace Ids +} // namespace Attributes +} // namespace Thermostat + +namespace FanControl { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId FanMode = 0x0000; +static constexpr chip::AttributeId FanModeSequence = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace FanControl + +namespace DehumidificationControl { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId RelativeHumidity = 0x0000; +static constexpr chip::AttributeId DehumidificationCooling = 0x0001; +static constexpr chip::AttributeId RhDehumidificationSetpoint = 0x0010; +static constexpr chip::AttributeId RelativeHumidityMode = 0x0011; +static constexpr chip::AttributeId DehumidificationLockout = 0x0012; +static constexpr chip::AttributeId DehumidificationHysteresis = 0x0013; +static constexpr chip::AttributeId DehumidificationMaxCool = 0x0014; +static constexpr chip::AttributeId RelativeHumidityDisplay = 0x0015; +} // namespace Ids +} // namespace Attributes +} // namespace DehumidificationControl + +namespace ThermostatUserInterfaceConfiguration { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId TemperatureDisplayMode = 0x0000; +static constexpr chip::AttributeId KeypadLockout = 0x0001; +static constexpr chip::AttributeId ScheduleProgrammingVisibility = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace ThermostatUserInterfaceConfiguration + +namespace ColorControl { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId CurrentHue = 0x0000; +static constexpr chip::AttributeId CurrentSaturation = 0x0001; +static constexpr chip::AttributeId RemainingTime = 0x0002; +static constexpr chip::AttributeId CurrentX = 0x0003; +static constexpr chip::AttributeId CurrentY = 0x0004; +static constexpr chip::AttributeId DriftCompensation = 0x0005; +static constexpr chip::AttributeId CompensationText = 0x0006; +static constexpr chip::AttributeId ColorTemperature = 0x0007; +static constexpr chip::AttributeId ColorMode = 0x0008; +static constexpr chip::AttributeId ColorControlOptions = 0x000F; +static constexpr chip::AttributeId NumberOfPrimaries = 0x0010; +static constexpr chip::AttributeId Primary1X = 0x0011; +static constexpr chip::AttributeId Primary1Y = 0x0012; +static constexpr chip::AttributeId Primary1Intensity = 0x0013; +static constexpr chip::AttributeId Primary2X = 0x0015; +static constexpr chip::AttributeId Primary2Y = 0x0016; +static constexpr chip::AttributeId Primary2Intensity = 0x0017; +static constexpr chip::AttributeId Primary3X = 0x0019; +static constexpr chip::AttributeId Primary3Y = 0x001A; +static constexpr chip::AttributeId Primary3Intensity = 0x001B; +static constexpr chip::AttributeId Primary4X = 0x0020; +static constexpr chip::AttributeId Primary4Y = 0x0021; +static constexpr chip::AttributeId Primary4Intensity = 0x0022; +static constexpr chip::AttributeId Primary5X = 0x0024; +static constexpr chip::AttributeId Primary5Y = 0x0025; +static constexpr chip::AttributeId Primary5Intensity = 0x0026; +static constexpr chip::AttributeId Primary6X = 0x0028; +static constexpr chip::AttributeId Primary6Y = 0x0029; +static constexpr chip::AttributeId Primary6Intensity = 0x002A; +static constexpr chip::AttributeId WhitePointX = 0x0030; +static constexpr chip::AttributeId WhitePointY = 0x0031; +static constexpr chip::AttributeId ColorPointRX = 0x0032; +static constexpr chip::AttributeId ColorPointRY = 0x0033; +static constexpr chip::AttributeId ColorPointRIntensity = 0x0034; +static constexpr chip::AttributeId ColorPointGX = 0x0036; +static constexpr chip::AttributeId ColorPointGY = 0x0037; +static constexpr chip::AttributeId ColorPointGIntensity = 0x0038; +static constexpr chip::AttributeId ColorPointBX = 0x003A; +static constexpr chip::AttributeId ColorPointBY = 0x003B; +static constexpr chip::AttributeId ColorPointBIntensity = 0x003C; +static constexpr chip::AttributeId EnhancedCurrentHue = 0x4000; +static constexpr chip::AttributeId EnhancedColorMode = 0x4001; +static constexpr chip::AttributeId ColorLoopActive = 0x4002; +static constexpr chip::AttributeId ColorLoopDirection = 0x4003; +static constexpr chip::AttributeId ColorLoopTime = 0x4004; +static constexpr chip::AttributeId ColorLoopStartEnhancedHue = 0x4005; +static constexpr chip::AttributeId ColorLoopStoredEnhancedHue = 0x4006; +static constexpr chip::AttributeId ColorCapabilities = 0x400A; +static constexpr chip::AttributeId ColorTempPhysicalMin = 0x400B; +static constexpr chip::AttributeId ColorTempPhysicalMax = 0x400C; +static constexpr chip::AttributeId CoupleColorTempToLevelMinMireds = 0x400D; +static constexpr chip::AttributeId StartUpColorTemperatureMireds = 0x4010; +} // namespace Ids +} // namespace Attributes +} // namespace ColorControl + +namespace BallastConfiguration { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId PhysicalMinLevel = 0x0000; +static constexpr chip::AttributeId PhysicalMaxLevel = 0x0001; +static constexpr chip::AttributeId BallastStatus = 0x0002; +static constexpr chip::AttributeId MinLevel = 0x0010; +static constexpr chip::AttributeId MaxLevel = 0x0011; +static constexpr chip::AttributeId PowerOnLevel = 0x0012; +static constexpr chip::AttributeId PowerOnFadeTime = 0x0013; +static constexpr chip::AttributeId IntrinsicBallastFactor = 0x0014; +static constexpr chip::AttributeId BallastFactorAdjustment = 0x0015; +static constexpr chip::AttributeId LampQuality = 0x0020; +static constexpr chip::AttributeId LampType = 0x0030; +static constexpr chip::AttributeId LampManufacturer = 0x0031; +static constexpr chip::AttributeId LampRatedHours = 0x0032; +static constexpr chip::AttributeId LampBurnHours = 0x0033; +static constexpr chip::AttributeId LampAlarmMode = 0x0034; +static constexpr chip::AttributeId LampBurnHoursTripPoint = 0x0035; +} // namespace Ids +} // namespace Attributes +} // namespace BallastConfiguration + +namespace IlluminanceMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +static constexpr chip::AttributeId LightSensorType = 0x0004; +} // namespace Ids +} // namespace Attributes +} // namespace IlluminanceMeasurement + +namespace IlluminanceLevelSensing { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId LevelStatus = 0x0000; +static constexpr chip::AttributeId LightSensorType = 0x0001; +static constexpr chip::AttributeId IlluminanceLevelTarget = 0x0010; +} // namespace Ids +} // namespace Attributes +} // namespace IlluminanceLevelSensing + +namespace TemperatureMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace TemperatureMeasurement + +namespace PressureMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +static constexpr chip::AttributeId ScaledValue = 0x0010; +static constexpr chip::AttributeId MinScaledValue = 0x0011; +static constexpr chip::AttributeId MaxScaledValue = 0x0012; +static constexpr chip::AttributeId ScaledTolerance = 0x0013; +static constexpr chip::AttributeId Scale = 0x0014; +} // namespace Ids +} // namespace Attributes +} // namespace PressureMeasurement + +namespace FlowMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace FlowMeasurement + +namespace RelativeHumidityMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace RelativeHumidityMeasurement + +namespace OccupancySensing { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId Occupancy = 0x0000; +static constexpr chip::AttributeId OccupancySensorType = 0x0001; +static constexpr chip::AttributeId OccupancySensorTypeBitmap = 0x0002; +static constexpr chip::AttributeId PirOccupiedToUnoccupiedDelay = 0x0010; +static constexpr chip::AttributeId PirUnoccupiedToOccupiedDelay = 0x0011; +static constexpr chip::AttributeId PirUnoccupiedToOccupiedThreshold = 0x0012; +static constexpr chip::AttributeId UltrasonicOccupiedToUnoccupiedDelay = 0x0020; +static constexpr chip::AttributeId UltrasonicUnoccupiedToOccupiedDelay = 0x0021; +static constexpr chip::AttributeId UltrasonicUnoccupiedToOccupiedThreshold = 0x0022; +static constexpr chip::AttributeId PhysicalContactOccupiedToUnoccupiedDelay = 0x0030; +static constexpr chip::AttributeId PhysicalContactUnoccupiedToOccupiedDelay = 0x0031; +static constexpr chip::AttributeId PhysicalContactUnoccupiedToOccupiedThreshold = 0x0032; +} // namespace Ids +} // namespace Attributes +} // namespace OccupancySensing + +namespace CarbonMonoxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace CarbonMonoxideConcentrationMeasurement + +namespace CarbonDioxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace CarbonDioxideConcentrationMeasurement + +namespace EthyleneConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace EthyleneConcentrationMeasurement + +namespace EthyleneOxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace EthyleneOxideConcentrationMeasurement + +namespace HydrogenConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace HydrogenConcentrationMeasurement + +namespace HydrogenSulphideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace HydrogenSulphideConcentrationMeasurement + +namespace NitricOxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace NitricOxideConcentrationMeasurement + +namespace NitrogenDioxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace NitrogenDioxideConcentrationMeasurement + +namespace OxygenConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace OxygenConcentrationMeasurement + +namespace OzoneConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace OzoneConcentrationMeasurement + +namespace SulfurDioxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace SulfurDioxideConcentrationMeasurement + +namespace DissolvedOxygenConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace DissolvedOxygenConcentrationMeasurement + +namespace BromateConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace BromateConcentrationMeasurement + +namespace ChloraminesConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ChloraminesConcentrationMeasurement + +namespace ChlorineConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ChlorineConcentrationMeasurement + +namespace FecalColiformAndEColiConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace FecalColiformAndEColiConcentrationMeasurement + +namespace FluorideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace FluorideConcentrationMeasurement + +namespace HaloaceticAcidsConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace HaloaceticAcidsConcentrationMeasurement + +namespace TotalTrihalomethanesConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace TotalTrihalomethanesConcentrationMeasurement + +namespace TotalColiformBacteriaConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace TotalColiformBacteriaConcentrationMeasurement + +namespace TurbidityConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace TurbidityConcentrationMeasurement + +namespace CopperConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace CopperConcentrationMeasurement + +namespace LeadConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace LeadConcentrationMeasurement + +namespace ManganeseConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ManganeseConcentrationMeasurement + +namespace SulfateConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace SulfateConcentrationMeasurement + +namespace BromodichloromethaneConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace BromodichloromethaneConcentrationMeasurement + +namespace BromoformConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace BromoformConcentrationMeasurement + +namespace ChlorodibromomethaneConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ChlorodibromomethaneConcentrationMeasurement + +namespace ChloroformConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ChloroformConcentrationMeasurement + +namespace SodiumConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasuredValue = 0x0000; +static constexpr chip::AttributeId MinMeasuredValue = 0x0001; +static constexpr chip::AttributeId MaxMeasuredValue = 0x0002; +static constexpr chip::AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace SodiumConcentrationMeasurement + +namespace IasZone { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId ZoneState = 0x0000; +static constexpr chip::AttributeId ZoneType = 0x0001; +static constexpr chip::AttributeId ZoneStatus = 0x0002; +static constexpr chip::AttributeId IasCieAddress = 0x0010; +static constexpr chip::AttributeId ZoneId = 0x0011; +static constexpr chip::AttributeId NumberOfZoneSensitivityLevelsSupported = 0x0012; +static constexpr chip::AttributeId CurrentZoneSensitivityLevel = 0x0013; +} // namespace Ids +} // namespace Attributes +} // namespace IasZone + +namespace IasWd { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MaxDuration = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace IasWd + +namespace WakeOnLan { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId WakeOnLanMacAddress = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace WakeOnLan + +namespace TvChannel { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId TvChannelList = 0x0000; +static constexpr chip::AttributeId TvChannelLineup = 0x0001; +static constexpr chip::AttributeId CurrentTvChannel = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace TvChannel + +namespace TargetNavigator { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId TargetNavigatorList = 0x0000; +static constexpr chip::AttributeId CurrentNavigatorTarget = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace TargetNavigator + +namespace MediaPlayback { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId PlaybackState = 0x0000; +static constexpr chip::AttributeId StartTime = 0x0001; +static constexpr chip::AttributeId Duration = 0x0002; +static constexpr chip::AttributeId UpdatedAt = 0x0003; +static constexpr chip::AttributeId Posistion = 0x0004; +static constexpr chip::AttributeId PlaybackSpeed = 0x0005; +static constexpr chip::AttributeId SeekRangeEnd = 0x0006; +static constexpr chip::AttributeId SeekRangeStart = 0x0007; +} // namespace Ids +} // namespace Attributes +} // namespace MediaPlayback + +namespace MediaInput { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MediaInputList = 0x0000; +static constexpr chip::AttributeId CurrentMediaInput = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace MediaInput + +namespace ContentLauncher { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId AcceptsHeaderList = 0x0000; +static constexpr chip::AttributeId SupportedStreamingTypes = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace ContentLauncher + +namespace AudioOutput { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId AudioOutputList = 0x0000; +static constexpr chip::AttributeId CurrentAudioOutput = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace AudioOutput + +namespace ApplicationLauncher { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId ApplicationLauncherList = 0x0000; +static constexpr chip::AttributeId CatalogVendorId = 0x0001; +static constexpr chip::AttributeId ApplicationId = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace ApplicationLauncher + +namespace ApplicationBasic { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId VendorName = 0x0000; +static constexpr chip::AttributeId VendorId = 0x0001; +static constexpr chip::AttributeId ApplicationName = 0x0002; +static constexpr chip::AttributeId ProductId = 0x0003; +static constexpr chip::AttributeId ApplicationId = 0x0005; +static constexpr chip::AttributeId CatalogVendorId = 0x0006; +static constexpr chip::AttributeId ApplicationSatus = 0x0007; +} // namespace Ids +} // namespace Attributes +} // namespace ApplicationBasic + +namespace TestCluster { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId Boolean = 0x0000; +static constexpr chip::AttributeId Bitmap8 = 0x0001; +static constexpr chip::AttributeId Bitmap16 = 0x0002; +static constexpr chip::AttributeId Bitmap32 = 0x0003; +static constexpr chip::AttributeId Bitmap64 = 0x0004; +static constexpr chip::AttributeId Int8u = 0x0005; +static constexpr chip::AttributeId Int16u = 0x0006; +static constexpr chip::AttributeId Int32u = 0x0008; +static constexpr chip::AttributeId Int64u = 0x000C; +static constexpr chip::AttributeId Int8s = 0x000D; +static constexpr chip::AttributeId Int16s = 0x000E; +static constexpr chip::AttributeId Int32s = 0x0010; +static constexpr chip::AttributeId Int64s = 0x0014; +static constexpr chip::AttributeId Enum8 = 0x0015; +static constexpr chip::AttributeId Enum16 = 0x0016; +static constexpr chip::AttributeId OctetString = 0x0019; +static constexpr chip::AttributeId ListInt8u = 0x001A; +static constexpr chip::AttributeId ListOctetString = 0x001B; +static constexpr chip::AttributeId ListStructOctetString = 0x001C; +static constexpr chip::AttributeId LongOctetString = 0x001D; +static constexpr chip::AttributeId Unsupported = 0x00FF; +} // namespace Ids +} // namespace Attributes +} // namespace TestCluster + +namespace ApplianceIdentification { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId BasicIdentification = 0x0000; +static constexpr chip::AttributeId CompanyName = 0x0010; +static constexpr chip::AttributeId CompanyId = 0x0011; +static constexpr chip::AttributeId BrandName = 0x0012; +static constexpr chip::AttributeId BrandId = 0x0013; +static constexpr chip::AttributeId Model = 0x0014; +static constexpr chip::AttributeId PartNumber = 0x0015; +static constexpr chip::AttributeId ProductRevision = 0x0016; +static constexpr chip::AttributeId SoftwareRevision = 0x0017; +static constexpr chip::AttributeId ProductTypeName = 0x0018; +static constexpr chip::AttributeId ProductTypeId = 0x0019; +static constexpr chip::AttributeId CecedSpecificationVersion = 0x001A; +} // namespace Ids +} // namespace Attributes +} // namespace ApplianceIdentification + +namespace MeterIdentification { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId CompanyName = 0x0000; +static constexpr chip::AttributeId MeterTypeId = 0x0001; +static constexpr chip::AttributeId DataQualityId = 0x0004; +static constexpr chip::AttributeId CustomerName = 0x0005; +static constexpr chip::AttributeId Model = 0x0006; +static constexpr chip::AttributeId PartNumber = 0x0007; +static constexpr chip::AttributeId ProductRevision = 0x0008; +static constexpr chip::AttributeId SoftwareRevision = 0x000A; +static constexpr chip::AttributeId UtilityName = 0x000B; +static constexpr chip::AttributeId Pod = 0x000C; +static constexpr chip::AttributeId AvailablePower = 0x000D; +static constexpr chip::AttributeId PowerThreshold = 0x000E; +} // namespace Ids +} // namespace Attributes +} // namespace MeterIdentification + +namespace ApplianceStatistics { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId LogMaxSize = 0x0000; +static constexpr chip::AttributeId LogQueueMaxSize = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace ApplianceStatistics + +namespace ElectricalMeasurement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId MeasurementType = 0x0000; +static constexpr chip::AttributeId DcVoltage = 0x0100; +static constexpr chip::AttributeId DcVoltageMin = 0x0101; +static constexpr chip::AttributeId DcVoltageMax = 0x0102; +static constexpr chip::AttributeId DcCurrent = 0x0103; +static constexpr chip::AttributeId DcCurrentMin = 0x0104; +static constexpr chip::AttributeId DcCurrentMax = 0x0105; +static constexpr chip::AttributeId DcPower = 0x0106; +static constexpr chip::AttributeId DcPowerMin = 0x0107; +static constexpr chip::AttributeId DcPowerMax = 0x0108; +static constexpr chip::AttributeId DcVoltageMultiplier = 0x0200; +static constexpr chip::AttributeId DcVoltageDivisor = 0x0201; +static constexpr chip::AttributeId DcCurrentMultiplier = 0x0202; +static constexpr chip::AttributeId DcCurrentDivisor = 0x0203; +static constexpr chip::AttributeId DcPowerMultiplier = 0x0204; +static constexpr chip::AttributeId DcPowerDivisor = 0x0205; +static constexpr chip::AttributeId AcFrequency = 0x0300; +static constexpr chip::AttributeId AcFrequencyMin = 0x0301; +static constexpr chip::AttributeId AcFrequencyMax = 0x0302; +static constexpr chip::AttributeId NeutralCurrent = 0x0303; +static constexpr chip::AttributeId TotalActivePower = 0x0304; +static constexpr chip::AttributeId TotalReactivePower = 0x0305; +static constexpr chip::AttributeId TotalApparentPower = 0x0306; +static constexpr chip::AttributeId Measured1stHarmonicCurrent = 0x0307; +static constexpr chip::AttributeId Measured3rdHarmonicCurrent = 0x0308; +static constexpr chip::AttributeId Measured5thHarmonicCurrent = 0x0309; +static constexpr chip::AttributeId Measured7thHarmonicCurrent = 0x030A; +static constexpr chip::AttributeId Measured9thHarmonicCurrent = 0x030B; +static constexpr chip::AttributeId Measured11thHarmonicCurrent = 0x030C; +static constexpr chip::AttributeId MeasuredPhase1stHarmonicCurrent = 0x030D; +static constexpr chip::AttributeId MeasuredPhase3rdHarmonicCurrent = 0x030E; +static constexpr chip::AttributeId MeasuredPhase5thHarmonicCurrent = 0x030F; +static constexpr chip::AttributeId MeasuredPhase7thHarmonicCurrent = 0x0310; +static constexpr chip::AttributeId MeasuredPhase9thHarmonicCurrent = 0x0311; +static constexpr chip::AttributeId MeasuredPhase11thHarmonicCurrent = 0x0312; +static constexpr chip::AttributeId AcFrequencyMultiplier = 0x0400; +static constexpr chip::AttributeId AcFrequencyDivisor = 0x0401; +static constexpr chip::AttributeId PowerMultiplier = 0x0402; +static constexpr chip::AttributeId PowerDivisor = 0x0403; +static constexpr chip::AttributeId HarmonicCurrentMultiplier = 0x0404; +static constexpr chip::AttributeId PhaseHarmonicCurrentMultiplier = 0x0405; +static constexpr chip::AttributeId InstantaneousVoltage = 0x0500; +static constexpr chip::AttributeId InstantaneousLineCurrent = 0x0501; +static constexpr chip::AttributeId InstantaneousActiveCurrent = 0x0502; +static constexpr chip::AttributeId InstantaneousReactiveCurrent = 0x0503; +static constexpr chip::AttributeId InstantaneousPower = 0x0504; +static constexpr chip::AttributeId RmsVoltage = 0x0505; +static constexpr chip::AttributeId RmsVoltageMin = 0x0506; +static constexpr chip::AttributeId RmsVoltageMax = 0x0507; +static constexpr chip::AttributeId RmsCurrent = 0x0508; +static constexpr chip::AttributeId RmsCurrentMin = 0x0509; +static constexpr chip::AttributeId RmsCurrentMax = 0x050A; +static constexpr chip::AttributeId ActivePower = 0x050B; +static constexpr chip::AttributeId ActivePowerMin = 0x050C; +static constexpr chip::AttributeId ActivePowerMax = 0x050D; +static constexpr chip::AttributeId ReactivePower = 0x050E; +static constexpr chip::AttributeId ApparentPower = 0x050F; +static constexpr chip::AttributeId PowerFactor = 0x0510; +static constexpr chip::AttributeId AverageRmsVoltageMeasurementPeriod = 0x0511; +static constexpr chip::AttributeId AverageRmsUnderVoltageCounter = 0x0513; +static constexpr chip::AttributeId RmsExtremeOverVoltagePeriod = 0x0514; +static constexpr chip::AttributeId RmsExtremeUnderVoltagePeriod = 0x0515; +static constexpr chip::AttributeId RmsVoltageSagPeriod = 0x0516; +static constexpr chip::AttributeId RmsVoltageSwellPeriod = 0x0517; +static constexpr chip::AttributeId AcVoltageMultiplier = 0x0600; +static constexpr chip::AttributeId AcVoltageDivisor = 0x0601; +static constexpr chip::AttributeId AcCurrentMultiplier = 0x0602; +static constexpr chip::AttributeId AcCurrentDivisor = 0x0603; +static constexpr chip::AttributeId AcPowerMultiplier = 0x0604; +static constexpr chip::AttributeId AcPowerDivisor = 0x0605; +static constexpr chip::AttributeId OverloadAlarmsMask = 0x0700; +static constexpr chip::AttributeId VoltageOverload = 0x0701; +static constexpr chip::AttributeId CurrentOverload = 0x0702; +static constexpr chip::AttributeId AcOverloadAlarmsMask = 0x0800; +static constexpr chip::AttributeId AcVoltageOverload = 0x0801; +static constexpr chip::AttributeId AcCurrentOverload = 0x0802; +static constexpr chip::AttributeId AcActivePowerOverload = 0x0803; +static constexpr chip::AttributeId AcReactivePowerOverload = 0x0804; +static constexpr chip::AttributeId AverageRmsOverVoltage = 0x0805; +static constexpr chip::AttributeId AverageRmsUnderVoltage = 0x0806; +static constexpr chip::AttributeId RmsExtremeOverVoltage = 0x0807; +static constexpr chip::AttributeId RmsExtremeUnderVoltage = 0x0808; +static constexpr chip::AttributeId RmsVoltageSag = 0x0809; +static constexpr chip::AttributeId RmsVoltageSwell = 0x080A; +static constexpr chip::AttributeId LineCurrentPhaseB = 0x0901; +static constexpr chip::AttributeId ActiveCurrentPhaseB = 0x0902; +static constexpr chip::AttributeId ReactiveCurrentPhaseB = 0x0903; +static constexpr chip::AttributeId RmsVoltagePhaseB = 0x0905; +static constexpr chip::AttributeId RmsVoltageMinPhaseB = 0x0906; +static constexpr chip::AttributeId RmsVoltageMaxPhaseB = 0x0907; +static constexpr chip::AttributeId RmsCurrentPhaseB = 0x0908; +static constexpr chip::AttributeId RmsCurrentMinPhaseB = 0x0909; +static constexpr chip::AttributeId RmsCurrentMaxPhaseB = 0x090A; +static constexpr chip::AttributeId ActivePowerPhaseB = 0x090B; +static constexpr chip::AttributeId ActivePowerMinPhaseB = 0x090C; +static constexpr chip::AttributeId ActivePowerMaxPhaseB = 0x090D; +static constexpr chip::AttributeId ReactivePowerPhaseB = 0x090E; +static constexpr chip::AttributeId ApparentPowerPhaseB = 0x090F; +static constexpr chip::AttributeId PowerFactorPhaseB = 0x0910; +static constexpr chip::AttributeId AverageRmsVoltageMeasurementPeriodPhaseB = 0x0911; +static constexpr chip::AttributeId AverageRmsOverVoltageCounterPhaseB = 0x0912; +static constexpr chip::AttributeId AverageRmsUnderVoltageCounterPhaseB = 0x0913; +static constexpr chip::AttributeId RmsExtremeOverVoltagePeriodPhaseB = 0x0914; +static constexpr chip::AttributeId RmsExtremeUnderVoltagePeriodPhaseB = 0x0915; +static constexpr chip::AttributeId RmsVoltageSagPeriodPhaseB = 0x0916; +static constexpr chip::AttributeId RmsVoltageSwellPeriodPhaseB = 0x0917; +static constexpr chip::AttributeId LineCurrentPhaseC = 0x0A01; +static constexpr chip::AttributeId ActiveCurrentPhaseC = 0x0A02; +static constexpr chip::AttributeId ReactiveCurrentPhaseC = 0x0A03; +static constexpr chip::AttributeId RmsVoltagePhaseC = 0x0A05; +static constexpr chip::AttributeId RmsVoltageMinPhaseC = 0x0A06; +static constexpr chip::AttributeId RmsVoltageMaxPhaseC = 0x0A07; +static constexpr chip::AttributeId RmsCurrentPhaseC = 0x0A08; +static constexpr chip::AttributeId RmsCurrentMinPhaseC = 0x0A09; +static constexpr chip::AttributeId RmsCurrentMaxPhaseC = 0x0A0A; +static constexpr chip::AttributeId ActivePowerPhaseC = 0x0A0B; +static constexpr chip::AttributeId ActivePowerMinPhaseC = 0x0A0C; +static constexpr chip::AttributeId ActivePowerMaxPhaseC = 0x0A0D; +static constexpr chip::AttributeId ReactivePowerPhaseC = 0x0A0E; +static constexpr chip::AttributeId ApparentPowerPhaseC = 0x0A0F; +static constexpr chip::AttributeId PowerFactorPhaseC = 0x0A10; +static constexpr chip::AttributeId AverageRmsVoltageMeasurementPeriodPhaseC = 0x0A11; +static constexpr chip::AttributeId AverageRmsOverVoltageCounterPhaseC = 0x0A12; +static constexpr chip::AttributeId AverageRmsUnderVoltageCounterPhaseC = 0x0A13; +static constexpr chip::AttributeId RmsExtremeOverVoltagePeriodPhaseC = 0x0A14; +static constexpr chip::AttributeId RmsExtremeUnderVoltagePeriodPhaseC = 0x0A15; +static constexpr chip::AttributeId RmsVoltageSagPeriodPhaseC = 0x0A16; +static constexpr chip::AttributeId RmsVoltageSwellPeriodPhaseC = 0x0A17; +} // namespace Ids +} // namespace Attributes +} // namespace ElectricalMeasurement + +namespace GroupKeyManagement { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId Groups = 0x0000; +static constexpr chip::AttributeId GroupKeys = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace GroupKeyManagement + +namespace SampleMfgSpecificCluster { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId EmberSampleAttribute = 0x0000; +static constexpr chip::AttributeId EmberSampleAttribute2 = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace SampleMfgSpecificCluster + +namespace SampleMfgSpecificCluster2 { +namespace Attributes { +namespace Ids { +static constexpr chip::AttributeId EmberSampleAttribute3 = 0x0000; +static constexpr chip::AttributeId EmberSampleAttribute4 = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace SampleMfgSpecificCluster2 + +} // namespace app +} // namespace chip diff --git a/src/app/common/gen/ids/Clusters.h b/src/app/common/gen/ids/Clusters.h new file mode 100644 index 00000000000000..7b76e585774577 --- /dev/null +++ b/src/app/common/gen/ids/Clusters.h @@ -0,0 +1,341 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#pragma once + +#include + +namespace chip { +namespace app { + +namespace PowerConfiguration { +static constexpr chip::ClusterId Id = 0x0001; +} // namespace PowerConfiguration +namespace DeviceTemperatureConfiguration { +static constexpr chip::ClusterId Id = 0x0002; +} // namespace DeviceTemperatureConfiguration +namespace Identify { +static constexpr chip::ClusterId Id = 0x0003; +} // namespace Identify +namespace Groups { +static constexpr chip::ClusterId Id = 0x0004; +} // namespace Groups +namespace Scenes { +static constexpr chip::ClusterId Id = 0x0005; +} // namespace Scenes +namespace OnOff { +static constexpr chip::ClusterId Id = 0x0006; +} // namespace OnOff +namespace OnOffSwitchConfiguration { +static constexpr chip::ClusterId Id = 0x0007; +} // namespace OnOffSwitchConfiguration +namespace LevelControl { +static constexpr chip::ClusterId Id = 0x0008; +} // namespace LevelControl +namespace Alarms { +static constexpr chip::ClusterId Id = 0x0009; +} // namespace Alarms +namespace Time { +static constexpr chip::ClusterId Id = 0x000A; +} // namespace Time +namespace BinaryInputBasic { +static constexpr chip::ClusterId Id = 0x000F; +} // namespace BinaryInputBasic +namespace PowerProfile { +static constexpr chip::ClusterId Id = 0x001A; +} // namespace PowerProfile +namespace ApplianceControl { +static constexpr chip::ClusterId Id = 0x001B; +} // namespace ApplianceControl +namespace Descriptor { +static constexpr chip::ClusterId Id = 0x001D; +} // namespace Descriptor +namespace PollControl { +static constexpr chip::ClusterId Id = 0x0020; +} // namespace PollControl +namespace Basic { +static constexpr chip::ClusterId Id = 0x0028; +} // namespace Basic +namespace OtaSoftwareUpdateServer { +static constexpr chip::ClusterId Id = 0x0029; +} // namespace OtaSoftwareUpdateServer +namespace OtaSoftwareUpdateClient { +static constexpr chip::ClusterId Id = 0x002A; +} // namespace OtaSoftwareUpdateClient +namespace GeneralCommissioning { +static constexpr chip::ClusterId Id = 0x0030; +} // namespace GeneralCommissioning +namespace NetworkCommissioning { +static constexpr chip::ClusterId Id = 0x0031; +} // namespace NetworkCommissioning +namespace DiagnosticLogs { +static constexpr chip::ClusterId Id = 0x0032; +} // namespace DiagnosticLogs +namespace GeneralDiagnostics { +static constexpr chip::ClusterId Id = 0x0033; +} // namespace GeneralDiagnostics +namespace SoftwareDiagnostics { +static constexpr chip::ClusterId Id = 0x0034; +} // namespace SoftwareDiagnostics +namespace ThreadNetworkDiagnostics { +static constexpr chip::ClusterId Id = 0x0035; +} // namespace ThreadNetworkDiagnostics +namespace WiFiNetworkDiagnostics { +static constexpr chip::ClusterId Id = 0x0036; +} // namespace WiFiNetworkDiagnostics +namespace EthernetNetworkDiagnostics { +static constexpr chip::ClusterId Id = 0x0037; +} // namespace EthernetNetworkDiagnostics +namespace BridgedDeviceBasic { +static constexpr chip::ClusterId Id = 0x0039; +} // namespace BridgedDeviceBasic +namespace Switch { +static constexpr chip::ClusterId Id = 0x003B; +} // namespace Switch +namespace OperationalCredentials { +static constexpr chip::ClusterId Id = 0x003E; +} // namespace OperationalCredentials +namespace FixedLabel { +static constexpr chip::ClusterId Id = 0x0040; +} // namespace FixedLabel +namespace ShadeConfiguration { +static constexpr chip::ClusterId Id = 0x0100; +} // namespace ShadeConfiguration +namespace DoorLock { +static constexpr chip::ClusterId Id = 0x0101; +} // namespace DoorLock +namespace WindowCovering { +static constexpr chip::ClusterId Id = 0x0102; +} // namespace WindowCovering +namespace BarrierControl { +static constexpr chip::ClusterId Id = 0x0103; +} // namespace BarrierControl +namespace PumpConfigurationAndControl { +static constexpr chip::ClusterId Id = 0x0200; +} // namespace PumpConfigurationAndControl +namespace Thermostat { +static constexpr chip::ClusterId Id = 0x0201; +} // namespace Thermostat +namespace FanControl { +static constexpr chip::ClusterId Id = 0x0202; +} // namespace FanControl +namespace DehumidificationControl { +static constexpr chip::ClusterId Id = 0x0203; +} // namespace DehumidificationControl +namespace ThermostatUserInterfaceConfiguration { +static constexpr chip::ClusterId Id = 0x0204; +} // namespace ThermostatUserInterfaceConfiguration +namespace ColorControl { +static constexpr chip::ClusterId Id = 0x0300; +} // namespace ColorControl +namespace BallastConfiguration { +static constexpr chip::ClusterId Id = 0x0301; +} // namespace BallastConfiguration +namespace IlluminanceMeasurement { +static constexpr chip::ClusterId Id = 0x0400; +} // namespace IlluminanceMeasurement +namespace IlluminanceLevelSensing { +static constexpr chip::ClusterId Id = 0x0401; +} // namespace IlluminanceLevelSensing +namespace TemperatureMeasurement { +static constexpr chip::ClusterId Id = 0x0402; +} // namespace TemperatureMeasurement +namespace PressureMeasurement { +static constexpr chip::ClusterId Id = 0x0403; +} // namespace PressureMeasurement +namespace FlowMeasurement { +static constexpr chip::ClusterId Id = 0x0404; +} // namespace FlowMeasurement +namespace RelativeHumidityMeasurement { +static constexpr chip::ClusterId Id = 0x0405; +} // namespace RelativeHumidityMeasurement +namespace OccupancySensing { +static constexpr chip::ClusterId Id = 0x0406; +} // namespace OccupancySensing +namespace CarbonMonoxideConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x040C; +} // namespace CarbonMonoxideConcentrationMeasurement +namespace CarbonDioxideConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x040D; +} // namespace CarbonDioxideConcentrationMeasurement +namespace EthyleneConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x040E; +} // namespace EthyleneConcentrationMeasurement +namespace EthyleneOxideConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x040F; +} // namespace EthyleneOxideConcentrationMeasurement +namespace HydrogenConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0410; +} // namespace HydrogenConcentrationMeasurement +namespace HydrogenSulphideConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0411; +} // namespace HydrogenSulphideConcentrationMeasurement +namespace NitricOxideConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0412; +} // namespace NitricOxideConcentrationMeasurement +namespace NitrogenDioxideConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0413; +} // namespace NitrogenDioxideConcentrationMeasurement +namespace OxygenConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0414; +} // namespace OxygenConcentrationMeasurement +namespace OzoneConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0415; +} // namespace OzoneConcentrationMeasurement +namespace SulfurDioxideConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0416; +} // namespace SulfurDioxideConcentrationMeasurement +namespace DissolvedOxygenConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0417; +} // namespace DissolvedOxygenConcentrationMeasurement +namespace BromateConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0418; +} // namespace BromateConcentrationMeasurement +namespace ChloraminesConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0419; +} // namespace ChloraminesConcentrationMeasurement +namespace ChlorineConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x041A; +} // namespace ChlorineConcentrationMeasurement +namespace FecalColiformAndEColiConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x041B; +} // namespace FecalColiformAndEColiConcentrationMeasurement +namespace FluorideConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x041C; +} // namespace FluorideConcentrationMeasurement +namespace HaloaceticAcidsConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x041D; +} // namespace HaloaceticAcidsConcentrationMeasurement +namespace TotalTrihalomethanesConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x041E; +} // namespace TotalTrihalomethanesConcentrationMeasurement +namespace TotalColiformBacteriaConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x041F; +} // namespace TotalColiformBacteriaConcentrationMeasurement +namespace TurbidityConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0420; +} // namespace TurbidityConcentrationMeasurement +namespace CopperConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0421; +} // namespace CopperConcentrationMeasurement +namespace LeadConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0422; +} // namespace LeadConcentrationMeasurement +namespace ManganeseConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0423; +} // namespace ManganeseConcentrationMeasurement +namespace SulfateConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0424; +} // namespace SulfateConcentrationMeasurement +namespace BromodichloromethaneConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0425; +} // namespace BromodichloromethaneConcentrationMeasurement +namespace BromoformConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0426; +} // namespace BromoformConcentrationMeasurement +namespace ChlorodibromomethaneConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0427; +} // namespace ChlorodibromomethaneConcentrationMeasurement +namespace ChloroformConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0428; +} // namespace ChloroformConcentrationMeasurement +namespace SodiumConcentrationMeasurement { +static constexpr chip::ClusterId Id = 0x0429; +} // namespace SodiumConcentrationMeasurement +namespace IasZone { +static constexpr chip::ClusterId Id = 0x0500; +} // namespace IasZone +namespace IasAce { +static constexpr chip::ClusterId Id = 0x0501; +} // namespace IasAce +namespace IasWd { +static constexpr chip::ClusterId Id = 0x0502; +} // namespace IasWd +namespace WakeOnLan { +static constexpr chip::ClusterId Id = 0x0503; +} // namespace WakeOnLan +namespace TvChannel { +static constexpr chip::ClusterId Id = 0x0504; +} // namespace TvChannel +namespace TargetNavigator { +static constexpr chip::ClusterId Id = 0x0505; +} // namespace TargetNavigator +namespace MediaPlayback { +static constexpr chip::ClusterId Id = 0x0506; +} // namespace MediaPlayback +namespace MediaInput { +static constexpr chip::ClusterId Id = 0x0507; +} // namespace MediaInput +namespace LowPower { +static constexpr chip::ClusterId Id = 0x0508; +} // namespace LowPower +namespace KeypadInput { +static constexpr chip::ClusterId Id = 0x0509; +} // namespace KeypadInput +namespace ContentLauncher { +static constexpr chip::ClusterId Id = 0x050A; +} // namespace ContentLauncher +namespace AudioOutput { +static constexpr chip::ClusterId Id = 0x050B; +} // namespace AudioOutput +namespace ApplicationLauncher { +static constexpr chip::ClusterId Id = 0x050C; +} // namespace ApplicationLauncher +namespace ApplicationBasic { +static constexpr chip::ClusterId Id = 0x050D; +} // namespace ApplicationBasic +namespace AccountLogin { +static constexpr chip::ClusterId Id = 0x050E; +} // namespace AccountLogin +namespace TestCluster { +static constexpr chip::ClusterId Id = 0x050F; +} // namespace TestCluster +namespace Messaging { +static constexpr chip::ClusterId Id = 0x0703; +} // namespace Messaging +namespace ApplianceIdentification { +static constexpr chip::ClusterId Id = 0x0B00; +} // namespace ApplianceIdentification +namespace MeterIdentification { +static constexpr chip::ClusterId Id = 0x0B01; +} // namespace MeterIdentification +namespace ApplianceEventsAndAlert { +static constexpr chip::ClusterId Id = 0x0B02; +} // namespace ApplianceEventsAndAlert +namespace ApplianceStatistics { +static constexpr chip::ClusterId Id = 0x0B03; +} // namespace ApplianceStatistics +namespace ElectricalMeasurement { +static constexpr chip::ClusterId Id = 0x0B04; +} // namespace ElectricalMeasurement +namespace Binding { +static constexpr chip::ClusterId Id = 0xF000; +} // namespace Binding +namespace GroupKeyManagement { +static constexpr chip::ClusterId Id = 0xF004; +} // namespace GroupKeyManagement +namespace SampleMfgSpecificCluster { +static constexpr chip::ClusterId Id = 0xFC00; +} // namespace SampleMfgSpecificCluster +namespace SampleMfgSpecificCluster2 { +static constexpr chip::ClusterId Id = 0xFC00; +} // namespace SampleMfgSpecificCluster2 + +} // namespace app +} // namespace chip diff --git a/src/app/common/gen/ids/Commands.h b/src/app/common/gen/ids/Commands.h new file mode 100644 index 00000000000000..070dd03449d6da --- /dev/null +++ b/src/app/common/gen/ids/Commands.h @@ -0,0 +1,736 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +#pragma once + +#include + +namespace chip { +namespace app { + +namespace Globals { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ReadAttributes = 0x00; +static constexpr chip::CommandId ReadAttributesResponse = 0x01; +static constexpr chip::CommandId WriteAttributes = 0x02; +static constexpr chip::CommandId WriteAttributesUndivided = 0x03; +static constexpr chip::CommandId WriteAttributesResponse = 0x04; +static constexpr chip::CommandId WriteAttributesNoResponse = 0x05; +static constexpr chip::CommandId ConfigureReporting = 0x06; +static constexpr chip::CommandId ConfigureReportingResponse = 0x07; +static constexpr chip::CommandId ReadReportingConfiguration = 0x08; +static constexpr chip::CommandId ReadReportingConfigurationResponse = 0x09; +static constexpr chip::CommandId ReportAttributes = 0x0A; +static constexpr chip::CommandId DefaultResponse = 0x0B; +static constexpr chip::CommandId DiscoverAttributes = 0x0C; +static constexpr chip::CommandId DiscoverAttributesResponse = 0x0D; +static constexpr chip::CommandId ReadAttributesStructured = 0x0E; +static constexpr chip::CommandId WriteAttributesStructured = 0x0F; +static constexpr chip::CommandId WriteAttributesStructuredResponse = 0x10; +static constexpr chip::CommandId DiscoverCommandsReceived = 0x11; +static constexpr chip::CommandId DiscoverCommandsReceivedResponse = 0x12; +static constexpr chip::CommandId DiscoverCommandsGenerated = 0x13; +static constexpr chip::CommandId DiscoverCommandsGeneratedResponse = 0x14; +static constexpr chip::CommandId DiscoverAttributesExtended = 0x15; +static constexpr chip::CommandId DiscoverAttributesExtendedResponse = 0x16; +} // namespace Commands +} // namespace Ids +} // namespace Globals + +namespace Identify { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId Identify = 0x00; +static constexpr chip::CommandId IdentifyQueryResponse = 0x00; +static constexpr chip::CommandId IdentifyQuery = 0x01; +static constexpr chip::CommandId EZModeInvoke = 0x02; +static constexpr chip::CommandId UpdateCommissionState = 0x03; +static constexpr chip::CommandId TriggerEffect = 0x40; +} // namespace Commands +} // namespace Ids +} // namespace Identify + +namespace Groups { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId AddGroup = 0x00; +static constexpr chip::CommandId AddGroupResponse = 0x00; +static constexpr chip::CommandId ViewGroup = 0x01; +static constexpr chip::CommandId ViewGroupResponse = 0x01; +static constexpr chip::CommandId GetGroupMembership = 0x02; +static constexpr chip::CommandId GetGroupMembershipResponse = 0x02; +static constexpr chip::CommandId RemoveGroup = 0x03; +static constexpr chip::CommandId RemoveGroupResponse = 0x03; +static constexpr chip::CommandId RemoveAllGroups = 0x04; +static constexpr chip::CommandId AddGroupIfIdentifying = 0x05; +} // namespace Commands +} // namespace Ids +} // namespace Groups + +namespace Scenes { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId AddScene = 0x00; +static constexpr chip::CommandId AddSceneResponse = 0x00; +static constexpr chip::CommandId ViewScene = 0x01; +static constexpr chip::CommandId ViewSceneResponse = 0x01; +static constexpr chip::CommandId RemoveScene = 0x02; +static constexpr chip::CommandId RemoveSceneResponse = 0x02; +static constexpr chip::CommandId RemoveAllScenes = 0x03; +static constexpr chip::CommandId RemoveAllScenesResponse = 0x03; +static constexpr chip::CommandId StoreScene = 0x04; +static constexpr chip::CommandId StoreSceneResponse = 0x04; +static constexpr chip::CommandId RecallScene = 0x05; +static constexpr chip::CommandId GetSceneMembership = 0x06; +static constexpr chip::CommandId GetSceneMembershipResponse = 0x06; +static constexpr chip::CommandId EnhancedAddScene = 0x40; +static constexpr chip::CommandId EnhancedAddSceneResponse = 0x40; +static constexpr chip::CommandId EnhancedViewScene = 0x41; +static constexpr chip::CommandId EnhancedViewSceneResponse = 0x41; +static constexpr chip::CommandId CopyScene = 0x42; +static constexpr chip::CommandId CopySceneResponse = 0x42; +} // namespace Commands +} // namespace Ids +} // namespace Scenes + +namespace OnOff { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId Off = 0x00; +static constexpr chip::CommandId SampleMfgSpecificOffWithTransition = 0x00; +static constexpr chip::CommandId On = 0x01; +static constexpr chip::CommandId SampleMfgSpecificOnWithTransition = 0x01; +static constexpr chip::CommandId SampleMfgSpecificOnWithTransition2 = 0x01; +static constexpr chip::CommandId Toggle = 0x02; +static constexpr chip::CommandId SampleMfgSpecificToggleWithTransition = 0x02; +static constexpr chip::CommandId SampleMfgSpecificToggleWithTransition2 = 0x02; +static constexpr chip::CommandId OffWithEffect = 0x40; +static constexpr chip::CommandId OnWithRecallGlobalScene = 0x41; +static constexpr chip::CommandId OnWithTimedOff = 0x42; +} // namespace Commands +} // namespace Ids +} // namespace OnOff + +namespace LevelControl { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId MoveToLevel = 0x00; +static constexpr chip::CommandId Move = 0x01; +static constexpr chip::CommandId Step = 0x02; +static constexpr chip::CommandId Stop = 0x03; +static constexpr chip::CommandId MoveToLevelWithOnOff = 0x04; +static constexpr chip::CommandId MoveWithOnOff = 0x05; +static constexpr chip::CommandId StepWithOnOff = 0x06; +static constexpr chip::CommandId StopWithOnOff = 0x07; +} // namespace Commands +} // namespace Ids +} // namespace LevelControl + +namespace Alarms { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ResetAlarm = 0x00; +static constexpr chip::CommandId Alarm = 0x00; +static constexpr chip::CommandId ResetAllAlarms = 0x01; +static constexpr chip::CommandId GetAlarmResponse = 0x01; +static constexpr chip::CommandId GetAlarm = 0x02; +static constexpr chip::CommandId ResetAlarmLog = 0x03; +} // namespace Commands +} // namespace Ids +} // namespace Alarms + +namespace PowerProfile { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId PowerProfileRequest = 0x00; +static constexpr chip::CommandId PowerProfileNotification = 0x00; +static constexpr chip::CommandId PowerProfileStateRequest = 0x01; +static constexpr chip::CommandId PowerProfileResponse = 0x01; +static constexpr chip::CommandId GetPowerProfilePriceResponse = 0x02; +static constexpr chip::CommandId PowerProfileStateResponse = 0x02; +static constexpr chip::CommandId GetOverallSchedulePriceResponse = 0x03; +static constexpr chip::CommandId GetPowerProfilePrice = 0x03; +static constexpr chip::CommandId EnergyPhasesScheduleNotification = 0x04; +static constexpr chip::CommandId PowerProfilesStateNotification = 0x04; +static constexpr chip::CommandId EnergyPhasesScheduleResponse = 0x05; +static constexpr chip::CommandId GetOverallSchedulePrice = 0x05; +static constexpr chip::CommandId PowerProfileScheduleConstraintsRequest = 0x06; +static constexpr chip::CommandId EnergyPhasesScheduleRequest = 0x06; +static constexpr chip::CommandId EnergyPhasesScheduleStateRequest = 0x07; +static constexpr chip::CommandId EnergyPhasesScheduleStateResponse = 0x07; +static constexpr chip::CommandId GetPowerProfilePriceExtendedResponse = 0x08; +static constexpr chip::CommandId EnergyPhasesScheduleStateNotification = 0x08; +static constexpr chip::CommandId PowerProfileScheduleConstraintsNotification = 0x09; +static constexpr chip::CommandId PowerProfileScheduleConstraintsResponse = 0x0A; +static constexpr chip::CommandId GetPowerProfilePriceExtended = 0x0B; +} // namespace Commands +} // namespace Ids +} // namespace PowerProfile + +namespace ApplianceControl { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ExecutionOfACommand = 0x00; +static constexpr chip::CommandId SignalStateResponse = 0x00; +static constexpr chip::CommandId SignalState = 0x01; +static constexpr chip::CommandId SignalStateNotification = 0x01; +static constexpr chip::CommandId WriteFunctions = 0x02; +static constexpr chip::CommandId OverloadPauseResume = 0x03; +static constexpr chip::CommandId OverloadPause = 0x04; +static constexpr chip::CommandId OverloadWarning = 0x05; +} // namespace Commands +} // namespace Ids +} // namespace ApplianceControl + +namespace PollControl { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId CheckIn = 0x00; +static constexpr chip::CommandId CheckInResponse = 0x00; +static constexpr chip::CommandId FastPollStop = 0x01; +static constexpr chip::CommandId SetLongPollInterval = 0x02; +static constexpr chip::CommandId SetShortPollInterval = 0x03; +} // namespace Commands +} // namespace Ids +} // namespace PollControl + +namespace Basic { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId StartUp = 0x00; +static constexpr chip::CommandId MfgSpecificPing = 0x00; +static constexpr chip::CommandId ShutDown = 0x01; +static constexpr chip::CommandId Leave = 0x02; +} // namespace Commands +} // namespace Ids +} // namespace Basic + +namespace OtaSoftwareUpdateServer { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId QueryImage = 0x00; +static constexpr chip::CommandId ApplyUpdateRequest = 0x01; +static constexpr chip::CommandId NotifyUpdateApplied = 0x02; +static constexpr chip::CommandId QueryImageResponse = 0x03; +static constexpr chip::CommandId ApplyUpdateRequestResponse = 0x04; +} // namespace Commands +} // namespace Ids +} // namespace OtaSoftwareUpdateServer + +namespace OtaSoftwareUpdateClient { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId AnnounceOtaServer = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace OtaSoftwareUpdateClient + +namespace GeneralCommissioning { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ArmFailSafe = 0x00; +static constexpr chip::CommandId ArmFailSafeResponse = 0x01; +static constexpr chip::CommandId SetRegulatoryConfig = 0x02; +static constexpr chip::CommandId SetRegulatoryConfigResponse = 0x03; +static constexpr chip::CommandId CommissioningComplete = 0x04; +static constexpr chip::CommandId CommissioningCompleteResponse = 0x05; +} // namespace Commands +} // namespace Ids +} // namespace GeneralCommissioning + +namespace NetworkCommissioning { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ScanNetworks = 0x00; +static constexpr chip::CommandId ScanNetworksResponse = 0x01; +static constexpr chip::CommandId AddWiFiNetwork = 0x02; +static constexpr chip::CommandId AddWiFiNetworkResponse = 0x03; +static constexpr chip::CommandId UpdateWiFiNetwork = 0x04; +static constexpr chip::CommandId UpdateWiFiNetworkResponse = 0x05; +static constexpr chip::CommandId AddThreadNetwork = 0x06; +static constexpr chip::CommandId AddThreadNetworkResponse = 0x07; +static constexpr chip::CommandId UpdateThreadNetwork = 0x08; +static constexpr chip::CommandId UpdateThreadNetworkResponse = 0x09; +static constexpr chip::CommandId RemoveNetwork = 0x0A; +static constexpr chip::CommandId RemoveNetworkResponse = 0x0B; +static constexpr chip::CommandId EnableNetwork = 0x0C; +static constexpr chip::CommandId EnableNetworkResponse = 0x0D; +static constexpr chip::CommandId DisableNetwork = 0x0E; +static constexpr chip::CommandId DisableNetworkResponse = 0x0F; +static constexpr chip::CommandId GetLastNetworkCommissioningResult = 0x10; +} // namespace Commands +} // namespace Ids +} // namespace NetworkCommissioning + +namespace DiagnosticLogs { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId RetrieveLogsRequest = 0x00; +static constexpr chip::CommandId RetrieveLogsResponse = 0x01; +} // namespace Commands +} // namespace Ids +} // namespace DiagnosticLogs + +namespace SoftwareDiagnostics { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ResetWatermarks = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace SoftwareDiagnostics + +namespace ThreadNetworkDiagnostics { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ResetCounts = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace ThreadNetworkDiagnostics + +namespace WiFiNetworkDiagnostics { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ResetCounts = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace WiFiNetworkDiagnostics + +namespace EthernetNetworkDiagnostics { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ResetCounts = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace EthernetNetworkDiagnostics + +namespace BridgedDeviceBasic { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId StartUp = 0x00; +static constexpr chip::CommandId ShutDown = 0x01; +static constexpr chip::CommandId Leave = 0x02; +static constexpr chip::CommandId ReachableChanged = 0x03; +} // namespace Commands +} // namespace Ids +} // namespace BridgedDeviceBasic + +namespace OperationalCredentials { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId SetFabric = 0x00; +static constexpr chip::CommandId SetFabricResponse = 0x01; +static constexpr chip::CommandId OpCSRRequest = 0x04; +static constexpr chip::CommandId OpCSRResponse = 0x05; +static constexpr chip::CommandId AddOpCert = 0x06; +static constexpr chip::CommandId OpCertResponse = 0x08; +static constexpr chip::CommandId UpdateFabricLabel = 0x09; +static constexpr chip::CommandId RemoveFabric = 0x0A; +static constexpr chip::CommandId RemoveAllFabrics = 0x0B; +static constexpr chip::CommandId AddTrustedRootCertificate = 0xA1; +static constexpr chip::CommandId RemoveTrustedRootCertificate = 0xA2; +} // namespace Commands +} // namespace Ids +} // namespace OperationalCredentials + +namespace DoorLock { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId LockDoor = 0x00; +static constexpr chip::CommandId LockDoorResponse = 0x00; +static constexpr chip::CommandId UnlockDoor = 0x01; +static constexpr chip::CommandId UnlockDoorResponse = 0x01; +static constexpr chip::CommandId Toggle = 0x02; +static constexpr chip::CommandId ToggleResponse = 0x02; +static constexpr chip::CommandId UnlockWithTimeout = 0x03; +static constexpr chip::CommandId UnlockWithTimeoutResponse = 0x03; +static constexpr chip::CommandId GetLogRecord = 0x04; +static constexpr chip::CommandId GetLogRecordResponse = 0x04; +static constexpr chip::CommandId SetPin = 0x05; +static constexpr chip::CommandId SetPinResponse = 0x05; +static constexpr chip::CommandId GetPin = 0x06; +static constexpr chip::CommandId GetPinResponse = 0x06; +static constexpr chip::CommandId ClearPin = 0x07; +static constexpr chip::CommandId ClearPinResponse = 0x07; +static constexpr chip::CommandId ClearAllPins = 0x08; +static constexpr chip::CommandId ClearAllPinsResponse = 0x08; +static constexpr chip::CommandId SetUserStatus = 0x09; +static constexpr chip::CommandId SetUserStatusResponse = 0x09; +static constexpr chip::CommandId GetUserStatus = 0x0A; +static constexpr chip::CommandId GetUserStatusResponse = 0x0A; +static constexpr chip::CommandId SetWeekdaySchedule = 0x0B; +static constexpr chip::CommandId SetWeekdayScheduleResponse = 0x0B; +static constexpr chip::CommandId GetWeekdaySchedule = 0x0C; +static constexpr chip::CommandId GetWeekdayScheduleResponse = 0x0C; +static constexpr chip::CommandId ClearWeekdaySchedule = 0x0D; +static constexpr chip::CommandId ClearWeekdayScheduleResponse = 0x0D; +static constexpr chip::CommandId SetYeardaySchedule = 0x0E; +static constexpr chip::CommandId SetYeardayScheduleResponse = 0x0E; +static constexpr chip::CommandId GetYeardaySchedule = 0x0F; +static constexpr chip::CommandId GetYeardayScheduleResponse = 0x0F; +static constexpr chip::CommandId ClearYeardaySchedule = 0x10; +static constexpr chip::CommandId ClearYeardayScheduleResponse = 0x10; +static constexpr chip::CommandId SetHolidaySchedule = 0x11; +static constexpr chip::CommandId SetHolidayScheduleResponse = 0x11; +static constexpr chip::CommandId GetHolidaySchedule = 0x12; +static constexpr chip::CommandId GetHolidayScheduleResponse = 0x12; +static constexpr chip::CommandId ClearHolidaySchedule = 0x13; +static constexpr chip::CommandId ClearHolidayScheduleResponse = 0x13; +static constexpr chip::CommandId SetUserType = 0x14; +static constexpr chip::CommandId SetUserTypeResponse = 0x14; +static constexpr chip::CommandId GetUserType = 0x15; +static constexpr chip::CommandId GetUserTypeResponse = 0x15; +static constexpr chip::CommandId SetRfid = 0x16; +static constexpr chip::CommandId SetRfidResponse = 0x16; +static constexpr chip::CommandId GetRfid = 0x17; +static constexpr chip::CommandId GetRfidResponse = 0x17; +static constexpr chip::CommandId ClearRfid = 0x18; +static constexpr chip::CommandId ClearRfidResponse = 0x18; +static constexpr chip::CommandId ClearAllRfids = 0x19; +static constexpr chip::CommandId ClearAllRfidsResponse = 0x19; +static constexpr chip::CommandId OperationEventNotification = 0x20; +static constexpr chip::CommandId ProgrammingEventNotification = 0x21; +} // namespace Commands +} // namespace Ids +} // namespace DoorLock + +namespace WindowCovering { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId UpOrOpen = 0x00; +static constexpr chip::CommandId DownOrClose = 0x01; +static constexpr chip::CommandId StopMotion = 0x02; +static constexpr chip::CommandId GoToLiftValue = 0x04; +static constexpr chip::CommandId GoToLiftPercentage = 0x05; +static constexpr chip::CommandId GoToTiltValue = 0x07; +static constexpr chip::CommandId GoToTiltPercentage = 0x08; +} // namespace Commands +} // namespace Ids +} // namespace WindowCovering + +namespace BarrierControl { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId BarrierControlGoToPercent = 0x00; +static constexpr chip::CommandId BarrierControlStop = 0x01; +} // namespace Commands +} // namespace Ids +} // namespace BarrierControl + +namespace Thermostat { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId SetpointRaiseLower = 0x00; +static constexpr chip::CommandId CurrentWeeklySchedule = 0x00; +static constexpr chip::CommandId SetWeeklySchedule = 0x01; +static constexpr chip::CommandId RelayStatusLog = 0x01; +static constexpr chip::CommandId GetWeeklySchedule = 0x02; +static constexpr chip::CommandId ClearWeeklySchedule = 0x03; +static constexpr chip::CommandId GetRelayStatusLog = 0x04; +} // namespace Commands +} // namespace Ids +} // namespace Thermostat + +namespace ColorControl { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId MoveToHue = 0x00; +static constexpr chip::CommandId MoveHue = 0x01; +static constexpr chip::CommandId StepHue = 0x02; +static constexpr chip::CommandId MoveToSaturation = 0x03; +static constexpr chip::CommandId MoveSaturation = 0x04; +static constexpr chip::CommandId StepSaturation = 0x05; +static constexpr chip::CommandId MoveToHueAndSaturation = 0x06; +static constexpr chip::CommandId MoveToColor = 0x07; +static constexpr chip::CommandId MoveColor = 0x08; +static constexpr chip::CommandId StepColor = 0x09; +static constexpr chip::CommandId MoveToColorTemperature = 0x0A; +static constexpr chip::CommandId EnhancedMoveToHue = 0x40; +static constexpr chip::CommandId EnhancedMoveHue = 0x41; +static constexpr chip::CommandId EnhancedStepHue = 0x42; +static constexpr chip::CommandId EnhancedMoveToHueAndSaturation = 0x43; +static constexpr chip::CommandId ColorLoopSet = 0x44; +static constexpr chip::CommandId StopMoveStep = 0x47; +static constexpr chip::CommandId MoveColorTemperature = 0x4B; +static constexpr chip::CommandId StepColorTemperature = 0x4C; +} // namespace Commands +} // namespace Ids +} // namespace ColorControl + +namespace IasZone { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ZoneEnrollResponse = 0x00; +static constexpr chip::CommandId ZoneStatusChangeNotification = 0x00; +static constexpr chip::CommandId InitiateNormalOperationMode = 0x01; +static constexpr chip::CommandId ZoneEnrollRequest = 0x01; +static constexpr chip::CommandId InitiateTestMode = 0x02; +static constexpr chip::CommandId InitiateNormalOperationModeResponse = 0x02; +static constexpr chip::CommandId InitiateTestModeResponse = 0x03; +} // namespace Commands +} // namespace Ids +} // namespace IasZone + +namespace IasAce { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId Arm = 0x00; +static constexpr chip::CommandId ArmResponse = 0x00; +static constexpr chip::CommandId Bypass = 0x01; +static constexpr chip::CommandId GetZoneIdMapResponse = 0x01; +static constexpr chip::CommandId Emergency = 0x02; +static constexpr chip::CommandId GetZoneInformationResponse = 0x02; +static constexpr chip::CommandId Fire = 0x03; +static constexpr chip::CommandId ZoneStatusChanged = 0x03; +static constexpr chip::CommandId Panic = 0x04; +static constexpr chip::CommandId PanelStatusChanged = 0x04; +static constexpr chip::CommandId GetZoneIdMap = 0x05; +static constexpr chip::CommandId GetPanelStatusResponse = 0x05; +static constexpr chip::CommandId GetZoneInformation = 0x06; +static constexpr chip::CommandId SetBypassedZoneList = 0x06; +static constexpr chip::CommandId GetPanelStatus = 0x07; +static constexpr chip::CommandId BypassResponse = 0x07; +static constexpr chip::CommandId GetBypassedZoneList = 0x08; +static constexpr chip::CommandId GetZoneStatusResponse = 0x08; +static constexpr chip::CommandId GetZoneStatus = 0x09; +} // namespace Commands +} // namespace Ids +} // namespace IasAce + +namespace IasWd { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId StartWarning = 0x00; +static constexpr chip::CommandId Squawk = 0x01; +} // namespace Commands +} // namespace Ids +} // namespace IasWd + +namespace TvChannel { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ChangeChannel = 0x00; +static constexpr chip::CommandId ChangeChannelResponse = 0x00; +static constexpr chip::CommandId ChangeChannelByNumber = 0x01; +static constexpr chip::CommandId SkipChannel = 0x02; +} // namespace Commands +} // namespace Ids +} // namespace TvChannel + +namespace TargetNavigator { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId NavigateTarget = 0x00; +static constexpr chip::CommandId NavigateTargetResponse = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace TargetNavigator + +namespace MediaPlayback { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId MediaPlay = 0x00; +static constexpr chip::CommandId MediaPlayResponse = 0x00; +static constexpr chip::CommandId MediaPause = 0x01; +static constexpr chip::CommandId MediaPauseResponse = 0x01; +static constexpr chip::CommandId MediaStop = 0x02; +static constexpr chip::CommandId MediaStopResponse = 0x02; +static constexpr chip::CommandId MediaStartOver = 0x03; +static constexpr chip::CommandId MediaStartOverResponse = 0x03; +static constexpr chip::CommandId MediaPrevious = 0x04; +static constexpr chip::CommandId MediaPreviousResponse = 0x04; +static constexpr chip::CommandId MediaNext = 0x05; +static constexpr chip::CommandId MediaNextResponse = 0x05; +static constexpr chip::CommandId MediaRewind = 0x06; +static constexpr chip::CommandId MediaRewindResponse = 0x06; +static constexpr chip::CommandId MediaFastForward = 0x07; +static constexpr chip::CommandId MediaFastForwardResponse = 0x07; +static constexpr chip::CommandId MediaSkipForward = 0x08; +static constexpr chip::CommandId MediaSkipForwardResponse = 0x08; +static constexpr chip::CommandId MediaSkipBackward = 0x09; +static constexpr chip::CommandId MediaSkipBackwardResponse = 0x09; +static constexpr chip::CommandId MediaSkipSeek = 0x0A; +static constexpr chip::CommandId MediaSkipSeekResponse = 0x0A; +} // namespace Commands +} // namespace Ids +} // namespace MediaPlayback + +namespace MediaInput { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId SelectInput = 0x00; +static constexpr chip::CommandId ShowInputStatus = 0x01; +static constexpr chip::CommandId HideInputStatus = 0x02; +static constexpr chip::CommandId RenameInput = 0x03; +} // namespace Commands +} // namespace Ids +} // namespace MediaInput + +namespace LowPower { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId Sleep = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace LowPower + +namespace KeypadInput { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId SendKey = 0x00; +static constexpr chip::CommandId SendKeyResponse = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace KeypadInput + +namespace ContentLauncher { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId LaunchContent = 0x00; +static constexpr chip::CommandId LaunchContentResponse = 0x00; +static constexpr chip::CommandId LaunchURL = 0x01; +static constexpr chip::CommandId LaunchURLResponse = 0x01; +} // namespace Commands +} // namespace Ids +} // namespace ContentLauncher + +namespace AudioOutput { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId SelectOutput = 0x00; +static constexpr chip::CommandId RenameOutput = 0x01; +} // namespace Commands +} // namespace Ids +} // namespace AudioOutput + +namespace ApplicationLauncher { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId LaunchApp = 0x00; +static constexpr chip::CommandId LaunchAppResponse = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace ApplicationLauncher + +namespace ApplicationBasic { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId ChangeStatus = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace ApplicationBasic + +namespace AccountLogin { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId GetSetupPIN = 0x00; +static constexpr chip::CommandId GetSetupPINResponse = 0x00; +static constexpr chip::CommandId Login = 0x01; +} // namespace Commands +} // namespace Ids +} // namespace AccountLogin + +namespace TestCluster { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId Test = 0x00; +static constexpr chip::CommandId TestSpecificResponse = 0x00; +static constexpr chip::CommandId TestNotHandled = 0x01; +static constexpr chip::CommandId TestSpecific = 0x02; +static constexpr chip::CommandId TestUnknownCommand = 0x03; +} // namespace Commands +} // namespace Ids +} // namespace TestCluster + +namespace Messaging { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId DisplayMessage = 0x00; +static constexpr chip::CommandId GetLastMessage = 0x00; +static constexpr chip::CommandId CancelMessage = 0x01; +static constexpr chip::CommandId MessageConfirmation = 0x01; +static constexpr chip::CommandId DisplayProtectedMessage = 0x02; +static constexpr chip::CommandId GetMessageCancellation = 0x02; +static constexpr chip::CommandId CancelAllMessages = 0x03; +} // namespace Commands +} // namespace Ids +} // namespace Messaging + +namespace ApplianceEventsAndAlert { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId GetAlerts = 0x00; +static constexpr chip::CommandId GetAlertsResponse = 0x00; +static constexpr chip::CommandId AlertsNotification = 0x01; +static constexpr chip::CommandId EventsNotification = 0x02; +} // namespace Commands +} // namespace Ids +} // namespace ApplianceEventsAndAlert + +namespace ApplianceStatistics { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId LogNotification = 0x00; +static constexpr chip::CommandId LogRequest = 0x00; +static constexpr chip::CommandId LogResponse = 0x01; +static constexpr chip::CommandId LogQueueRequest = 0x01; +static constexpr chip::CommandId LogQueueResponse = 0x02; +static constexpr chip::CommandId StatisticsAvailable = 0x03; +} // namespace Commands +} // namespace Ids +} // namespace ApplianceStatistics + +namespace ElectricalMeasurement { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId GetProfileInfoResponseCommand = 0x00; +static constexpr chip::CommandId GetProfileInfoCommand = 0x00; +static constexpr chip::CommandId GetMeasurementProfileResponseCommand = 0x01; +static constexpr chip::CommandId GetMeasurementProfileCommand = 0x01; +} // namespace Commands +} // namespace Ids +} // namespace ElectricalMeasurement + +namespace Binding { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId Bind = 0x00; +static constexpr chip::CommandId Unbind = 0x01; +} // namespace Commands +} // namespace Ids +} // namespace Binding + +namespace SampleMfgSpecificCluster { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId CommandOne = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace SampleMfgSpecificCluster + +namespace SampleMfgSpecificCluster2 { +namespace Ids { +namespace Commands { +static constexpr chip::CommandId CommandTwo = 0x00; +} // namespace Commands +} // namespace Ids +} // namespace SampleMfgSpecificCluster2 + +} // namespace app +} // namespace chip diff --git a/src/controller/data_model/gen/encoder.cpp b/src/controller/data_model/gen/encoder.cpp index 25b0c4b55c88e0..f265b2a8ec75c9 100644 --- a/src/controller/data_model/gen/encoder.cpp +++ b/src/controller/data_model/gen/encoder.cpp @@ -23,10 +23,14 @@ #include #include +#include +#include +#include #include #include using namespace chip; +using namespace chip::app; using namespace chip::System; using namespace chip::Encoding::LittleEndian; @@ -102,258 +106,6 @@ using namespace chip::Encoding::LittleEndian; #define EMBER_ZCL_REPORTING_DIRECTION_REPORTED 0x00 -#define ZCL_READ_ATTRIBUTES_COMMAND_ID (0x00) -#define ZCL_READ_ATTRIBUTES_RESPONSE_COMMAND_ID (0x01) -#define ZCL_WRITE_ATTRIBUTES_COMMAND_ID (0x02) -#define ZCL_WRITE_ATTRIBUTES_UNDIVIDED_COMMAND_ID (0x03) -#define ZCL_WRITE_ATTRIBUTES_RESPONSE_COMMAND_ID (0x04) -#define ZCL_WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND_ID (0x05) -#define ZCL_CONFIGURE_REPORTING_COMMAND_ID (0x06) -#define ZCL_CONFIGURE_REPORTING_RESPONSE_COMMAND_ID (0x07) -#define ZCL_READ_REPORTING_CONFIGURATION_COMMAND_ID (0x08) -#define ZCL_READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND_ID (0x09) -#define ZCL_REPORT_ATTRIBUTES_COMMAND_ID (0x0A) -#define ZCL_DEFAULT_RESPONSE_COMMAND_ID (0x0B) -#define ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID (0x0C) -#define ZCL_DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_ID (0x0D) -#define ZCL_READ_ATTRIBUTES_STRUCTURED_COMMAND_ID (0x0E) -#define ZCL_WRITE_ATTRIBUTES_STRUCTURED_COMMAND_ID (0x0F) -#define ZCL_WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND_ID (0x10) -#define ZCL_DISCOVER_COMMANDS_RECEIVED_COMMAND_ID (0x11) -#define ZCL_DISCOVER_COMMANDS_RECEIVED_RESPONSE_COMMAND_ID (0x12) -#define ZCL_DISCOVER_COMMANDS_GENERATED_COMMAND_ID (0x13) -#define ZCL_DISCOVER_COMMANDS_GENERATED_RESPONSE_COMMAND_ID (0x14) -#define ZCL_DISCOVER_ATTRIBUTES_EXTENDED_COMMAND_ID (0x15) -#define ZCL_DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE_COMMAND_ID (0x16) - -#define ACCOUNT_LOGIN_CLUSTER_ID 0x050E -#define ZCL_GET_SETUP_PIN_COMMAND_ID (0x00) -#define ZCL_LOGIN_COMMAND_ID (0x01) - -#define APPLICATION_BASIC_CLUSTER_ID 0x050D -#define ZCL_CHANGE_STATUS_COMMAND_ID (0x00) - -#define APPLICATION_LAUNCHER_CLUSTER_ID 0x050C -#define ZCL_LAUNCH_APP_COMMAND_ID (0x00) - -#define AUDIO_OUTPUT_CLUSTER_ID 0x050B -#define ZCL_RENAME_OUTPUT_COMMAND_ID (0x01) -#define ZCL_SELECT_OUTPUT_COMMAND_ID (0x00) - -#define BARRIER_CONTROL_CLUSTER_ID 0x0103 -#define ZCL_BARRIER_CONTROL_GO_TO_PERCENT_COMMAND_ID (0x00) -#define ZCL_BARRIER_CONTROL_STOP_COMMAND_ID (0x01) - -#define BASIC_CLUSTER_ID 0x0028 -#define ZCL_MFG_SPECIFIC_PING_COMMAND_ID (0x00) - -#define BINARY_INPUT_BASIC_CLUSTER_ID 0x000F - -#define BINDING_CLUSTER_ID 0xF000 -#define ZCL_BIND_COMMAND_ID (0x00) -#define ZCL_UNBIND_COMMAND_ID (0x01) - -#define BRIDGED_DEVICE_BASIC_CLUSTER_ID 0x0039 - -#define COLOR_CONTROL_CLUSTER_ID 0x0300 -#define ZCL_MOVE_COLOR_COMMAND_ID (0x08) -#define ZCL_MOVE_COLOR_TEMPERATURE_COMMAND_ID (0x4B) -#define ZCL_MOVE_HUE_COMMAND_ID (0x01) -#define ZCL_MOVE_SATURATION_COMMAND_ID (0x04) -#define ZCL_MOVE_TO_COLOR_COMMAND_ID (0x07) -#define ZCL_MOVE_TO_COLOR_TEMPERATURE_COMMAND_ID (0x0A) -#define ZCL_MOVE_TO_HUE_COMMAND_ID (0x00) -#define ZCL_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID (0x06) -#define ZCL_MOVE_TO_SATURATION_COMMAND_ID (0x03) -#define ZCL_STEP_COLOR_COMMAND_ID (0x09) -#define ZCL_STEP_COLOR_TEMPERATURE_COMMAND_ID (0x4C) -#define ZCL_STEP_HUE_COMMAND_ID (0x02) -#define ZCL_STEP_SATURATION_COMMAND_ID (0x05) -#define ZCL_STOP_MOVE_STEP_COMMAND_ID (0x47) - -#define CONTENT_LAUNCH_CLUSTER_ID 0x050A -#define ZCL_LAUNCH_CONTENT_COMMAND_ID (0x00) -#define ZCL_LAUNCH_URL_COMMAND_ID (0x01) - -#define DESCRIPTOR_CLUSTER_ID 0x001D - -#define DIAGNOSTIC_LOGS_CLUSTER_ID 0x0032 -#define ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID (0x00) - -#define DOOR_LOCK_CLUSTER_ID 0x0101 -#define ZCL_CLEAR_ALL_PINS_COMMAND_ID (0x08) -#define ZCL_CLEAR_ALL_RFIDS_COMMAND_ID (0x19) -#define ZCL_CLEAR_HOLIDAY_SCHEDULE_COMMAND_ID (0x13) -#define ZCL_CLEAR_PIN_COMMAND_ID (0x07) -#define ZCL_CLEAR_RFID_COMMAND_ID (0x18) -#define ZCL_CLEAR_WEEKDAY_SCHEDULE_COMMAND_ID (0x0D) -#define ZCL_CLEAR_YEARDAY_SCHEDULE_COMMAND_ID (0x10) -#define ZCL_GET_HOLIDAY_SCHEDULE_COMMAND_ID (0x12) -#define ZCL_GET_LOG_RECORD_COMMAND_ID (0x04) -#define ZCL_GET_PIN_COMMAND_ID (0x06) -#define ZCL_GET_RFID_COMMAND_ID (0x17) -#define ZCL_GET_USER_TYPE_COMMAND_ID (0x15) -#define ZCL_GET_WEEKDAY_SCHEDULE_COMMAND_ID (0x0C) -#define ZCL_GET_YEARDAY_SCHEDULE_COMMAND_ID (0x0F) -#define ZCL_LOCK_DOOR_COMMAND_ID (0x00) -#define ZCL_SET_HOLIDAY_SCHEDULE_COMMAND_ID (0x11) -#define ZCL_SET_PIN_COMMAND_ID (0x05) -#define ZCL_SET_RFID_COMMAND_ID (0x16) -#define ZCL_SET_USER_TYPE_COMMAND_ID (0x14) -#define ZCL_SET_WEEKDAY_SCHEDULE_COMMAND_ID (0x0B) -#define ZCL_SET_YEARDAY_SCHEDULE_COMMAND_ID (0x0E) -#define ZCL_UNLOCK_DOOR_COMMAND_ID (0x01) -#define ZCL_UNLOCK_WITH_TIMEOUT_COMMAND_ID (0x03) - -#define ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID 0x0037 -#define ZCL_RESET_COUNTS_COMMAND_ID (0x00) - -#define FIXED_LABEL_CLUSTER_ID 0x0040 - -#define GENERAL_COMMISSIONING_CLUSTER_ID 0x0030 -#define ZCL_ARM_FAIL_SAFE_COMMAND_ID (0x00) -#define ZCL_COMMISSIONING_COMPLETE_COMMAND_ID (0x04) -#define ZCL_SET_REGULATORY_CONFIG_COMMAND_ID (0x02) - -#define GENERAL_DIAGNOSTICS_CLUSTER_ID 0x0033 - -#define GROUP_KEY_MANAGEMENT_CLUSTER_ID 0xF004 - -#define GROUPS_CLUSTER_ID 0x0004 -#define ZCL_ADD_GROUP_COMMAND_ID (0x00) -#define ZCL_ADD_GROUP_IF_IDENTIFYING_COMMAND_ID (0x05) -#define ZCL_GET_GROUP_MEMBERSHIP_COMMAND_ID (0x02) -#define ZCL_REMOVE_ALL_GROUPS_COMMAND_ID (0x04) -#define ZCL_REMOVE_GROUP_COMMAND_ID (0x03) -#define ZCL_VIEW_GROUP_COMMAND_ID (0x01) - -#define IDENTIFY_CLUSTER_ID 0x0003 -#define ZCL_IDENTIFY_COMMAND_ID (0x00) -#define ZCL_IDENTIFY_QUERY_COMMAND_ID (0x01) - -#define KEYPAD_INPUT_CLUSTER_ID 0x0509 -#define ZCL_SEND_KEY_COMMAND_ID (0x00) - -#define LEVEL_CONTROL_CLUSTER_ID 0x0008 -#define ZCL_MOVE_COMMAND_ID (0x01) -#define ZCL_MOVE_TO_LEVEL_COMMAND_ID (0x00) -#define ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID (0x04) -#define ZCL_MOVE_WITH_ON_OFF_COMMAND_ID (0x05) -#define ZCL_STEP_COMMAND_ID (0x02) -#define ZCL_STEP_WITH_ON_OFF_COMMAND_ID (0x06) -#define ZCL_STOP_COMMAND_ID (0x03) -#define ZCL_STOP_WITH_ON_OFF_COMMAND_ID (0x07) - -#define LOW_POWER_CLUSTER_ID 0x0508 -#define ZCL_SLEEP_COMMAND_ID (0x00) - -#define MEDIA_INPUT_CLUSTER_ID 0x0507 -#define ZCL_HIDE_INPUT_STATUS_COMMAND_ID (0x02) -#define ZCL_RENAME_INPUT_COMMAND_ID (0x03) -#define ZCL_SELECT_INPUT_COMMAND_ID (0x00) -#define ZCL_SHOW_INPUT_STATUS_COMMAND_ID (0x01) - -#define MEDIA_PLAYBACK_CLUSTER_ID 0x0506 -#define ZCL_MEDIA_FAST_FORWARD_COMMAND_ID (0x07) -#define ZCL_MEDIA_NEXT_COMMAND_ID (0x05) -#define ZCL_MEDIA_PAUSE_COMMAND_ID (0x01) -#define ZCL_MEDIA_PLAY_COMMAND_ID (0x00) -#define ZCL_MEDIA_PREVIOUS_COMMAND_ID (0x04) -#define ZCL_MEDIA_REWIND_COMMAND_ID (0x06) -#define ZCL_MEDIA_SKIP_BACKWARD_COMMAND_ID (0x09) -#define ZCL_MEDIA_SKIP_FORWARD_COMMAND_ID (0x08) -#define ZCL_MEDIA_SKIP_SEEK_COMMAND_ID (0x0A) -#define ZCL_MEDIA_START_OVER_COMMAND_ID (0x03) -#define ZCL_MEDIA_STOP_COMMAND_ID (0x02) - -#define NETWORK_COMMISSIONING_CLUSTER_ID 0x0031 -#define ZCL_ADD_THREAD_NETWORK_COMMAND_ID (0x06) -#define ZCL_ADD_WI_FI_NETWORK_COMMAND_ID (0x02) -#define ZCL_DISABLE_NETWORK_COMMAND_ID (0x0E) -#define ZCL_ENABLE_NETWORK_COMMAND_ID (0x0C) -#define ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID (0x10) -#define ZCL_REMOVE_NETWORK_COMMAND_ID (0x0A) -#define ZCL_SCAN_NETWORKS_COMMAND_ID (0x00) -#define ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID (0x08) -#define ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID (0x04) - -#define OTA_SERVER_CLUSTER_ID 0x0029 -#define ZCL_APPLY_UPDATE_REQUEST_COMMAND_ID (0x01) -#define ZCL_NOTIFY_UPDATE_APPLIED_COMMAND_ID (0x02) -#define ZCL_QUERY_IMAGE_COMMAND_ID (0x00) - -#define ON_OFF_CLUSTER_ID 0x0006 -#define ZCL_OFF_COMMAND_ID (0x00) -#define ZCL_ON_COMMAND_ID (0x01) -#define ZCL_TOGGLE_COMMAND_ID (0x02) - -#define OPERATIONAL_CREDENTIALS_CLUSTER_ID 0x003E -#define ZCL_ADD_OP_CERT_COMMAND_ID (0x06) -#define ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID (0xA1) -#define ZCL_OP_CSR_REQUEST_COMMAND_ID (0x04) -#define ZCL_REMOVE_ALL_FABRICS_COMMAND_ID (0x0B) -#define ZCL_REMOVE_FABRIC_COMMAND_ID (0x0A) -#define ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID (0xA2) -#define ZCL_SET_FABRIC_COMMAND_ID (0x00) -#define ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID (0x09) - -#define PRESSURE_MEASUREMENT_CLUSTER_ID 0x0403 - -#define PUMP_CONFIG_CONTROL_CLUSTER_ID 0x0200 - -#define RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID 0x0405 - -#define SCENES_CLUSTER_ID 0x0005 -#define ZCL_ADD_SCENE_COMMAND_ID (0x00) -#define ZCL_GET_SCENE_MEMBERSHIP_COMMAND_ID (0x06) -#define ZCL_RECALL_SCENE_COMMAND_ID (0x05) -#define ZCL_REMOVE_ALL_SCENES_COMMAND_ID (0x03) -#define ZCL_REMOVE_SCENE_COMMAND_ID (0x02) -#define ZCL_STORE_SCENE_COMMAND_ID (0x04) -#define ZCL_VIEW_SCENE_COMMAND_ID (0x01) - -#define SOFTWARE_DIAGNOSTICS_CLUSTER_ID 0x0034 -#define ZCL_RESET_WATERMARKS_COMMAND_ID (0x00) - -#define SWITCH_CLUSTER_ID 0x003B - -#define TV_CHANNEL_CLUSTER_ID 0x0504 -#define ZCL_CHANGE_CHANNEL_COMMAND_ID (0x00) -#define ZCL_CHANGE_CHANNEL_BY_NUMBER_COMMAND_ID (0x01) -#define ZCL_SKIP_CHANNEL_COMMAND_ID (0x02) - -#define TARGET_NAVIGATOR_CLUSTER_ID 0x0505 -#define ZCL_NAVIGATE_TARGET_COMMAND_ID (0x00) - -#define TEMP_MEASUREMENT_CLUSTER_ID 0x0402 - -#define TEST_CLUSTER_ID 0x050F -#define ZCL_TEST_COMMAND_ID (0x00) -#define ZCL_TEST_NOT_HANDLED_COMMAND_ID (0x01) -#define ZCL_TEST_SPECIFIC_COMMAND_ID (0x02) -#define ZCL_TEST_UNKNOWN_COMMAND_COMMAND_ID (0x03) - -#define THERMOSTAT_CLUSTER_ID 0x0201 -#define ZCL_CLEAR_WEEKLY_SCHEDULE_COMMAND_ID (0x03) -#define ZCL_GET_RELAY_STATUS_LOG_COMMAND_ID (0x04) -#define ZCL_GET_WEEKLY_SCHEDULE_COMMAND_ID (0x02) -#define ZCL_SET_WEEKLY_SCHEDULE_COMMAND_ID (0x01) -#define ZCL_SETPOINT_RAISE_LOWER_COMMAND_ID (0x00) - -#define THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID 0x0035 -#define ZCL_RESET_COUNTS_COMMAND_ID (0x00) - -#define WAKE_ON_LAN_CLUSTER_ID 0x0503 - -#define WINDOW_COVERING_CLUSTER_ID 0x0102 -#define ZCL_DOWN_OR_CLOSE_COMMAND_ID (0x01) -#define ZCL_GO_TO_LIFT_PERCENTAGE_COMMAND_ID (0x05) -#define ZCL_GO_TO_LIFT_VALUE_COMMAND_ID (0x04) -#define ZCL_GO_TO_TILT_PERCENTAGE_COMMAND_ID (0x08) -#define ZCL_GO_TO_TILT_VALUE_COMMAND_ID (0x07) -#define ZCL_STOP_MOTION_COMMAND_ID (0x02) -#define ZCL_UP_OR_OPEN_COMMAND_ID (0x00) - // TODO: Find a way to calculate maximum message length for clusters // https://github.com/project-chip/connectedhomeip/issues/965 constexpr uint16_t kMaxBufferSize = 1024; @@ -379,8 +131,8 @@ constexpr EndpointId kSourceEndpoint = 1; PacketBufferHandle encodeAccountLoginClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverAccountLoginAttributes", ACCOUNT_LOGIN_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverAccountLoginAttributes", AccountLogin::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -389,8 +141,11 @@ PacketBufferHandle encodeAccountLoginClusterDiscoverAttributes(uint8_t seqNum, E */ PacketBufferHandle encodeAccountLoginClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadAccountLoginClusterRevision", ACCOUNT_LOGIN_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadAccountLoginClusterRevision", AccountLogin::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -413,8 +168,8 @@ PacketBufferHandle encodeAccountLoginClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeApplicationBasicClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverApplicationBasicAttributes", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverApplicationBasicAttributes", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -423,8 +178,11 @@ PacketBufferHandle encodeApplicationBasicClusterDiscoverAttributes(uint8_t seqNu */ PacketBufferHandle encodeApplicationBasicClusterReadVendorNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicVendorName", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadApplicationBasicVendorName", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ApplicationBasic::Attributes::Ids::VendorName); COMMAND_FOOTER(); } @@ -433,8 +191,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadVendorNameAttribute(uint8_t */ PacketBufferHandle encodeApplicationBasicClusterReadVendorIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicVendorId", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadApplicationBasicVendorId", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ApplicationBasic::Attributes::Ids::VendorId); COMMAND_FOOTER(); } @@ -443,8 +204,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadVendorIdAttribute(uint8_t se */ PacketBufferHandle encodeApplicationBasicClusterReadApplicationNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicApplicationName", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadApplicationBasicApplicationName", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ApplicationBasic::Attributes::Ids::ApplicationName); COMMAND_FOOTER(); } @@ -453,8 +217,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadApplicationNameAttribute(uin */ PacketBufferHandle encodeApplicationBasicClusterReadProductIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicProductId", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadApplicationBasicProductId", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ApplicationBasic::Attributes::Ids::ProductId); COMMAND_FOOTER(); } @@ -463,8 +230,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadProductIdAttribute(uint8_t s */ PacketBufferHandle encodeApplicationBasicClusterReadApplicationIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicApplicationId", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0005); + COMMAND_HEADER("ReadApplicationBasicApplicationId", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ApplicationBasic::Attributes::Ids::ApplicationId); COMMAND_FOOTER(); } @@ -473,8 +243,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadApplicationIdAttribute(uint8 */ PacketBufferHandle encodeApplicationBasicClusterReadCatalogVendorIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicCatalogVendorId", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0006); + COMMAND_HEADER("ReadApplicationBasicCatalogVendorId", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ApplicationBasic::Attributes::Ids::CatalogVendorId); COMMAND_FOOTER(); } @@ -483,8 +256,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadCatalogVendorIdAttribute(uin */ PacketBufferHandle encodeApplicationBasicClusterReadApplicationSatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicApplicationSatus", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0007); + COMMAND_HEADER("ReadApplicationBasicApplicationSatus", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ApplicationBasic::Attributes::Ids::ApplicationSatus); COMMAND_FOOTER(); } @@ -493,8 +269,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadApplicationSatusAttribute(ui */ PacketBufferHandle encodeApplicationBasicClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicClusterRevision", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadApplicationBasicClusterRevision", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -511,8 +290,8 @@ PacketBufferHandle encodeApplicationBasicClusterReadClusterRevisionAttribute(uin PacketBufferHandle encodeApplicationLauncherClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverApplicationLauncherAttributes", APPLICATION_LAUNCHER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverApplicationLauncherAttributes", ApplicationLauncher::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -522,8 +301,11 @@ PacketBufferHandle encodeApplicationLauncherClusterDiscoverAttributes(uint8_t se PacketBufferHandle encodeApplicationLauncherClusterReadApplicationLauncherListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationLauncherApplicationLauncherList", APPLICATION_LAUNCHER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadApplicationLauncherApplicationLauncherList", ApplicationLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ApplicationLauncher::Attributes::Ids::ApplicationLauncherList); COMMAND_FOOTER(); } @@ -532,8 +314,11 @@ PacketBufferHandle encodeApplicationLauncherClusterReadApplicationLauncherListAt */ PacketBufferHandle encodeApplicationLauncherClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationLauncherClusterRevision", APPLICATION_LAUNCHER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadApplicationLauncherClusterRevision", ApplicationLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -551,8 +336,8 @@ PacketBufferHandle encodeApplicationLauncherClusterReadClusterRevisionAttribute( PacketBufferHandle encodeAudioOutputClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverAudioOutputAttributes", AUDIO_OUTPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverAudioOutputAttributes", AudioOutput::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -561,8 +346,11 @@ PacketBufferHandle encodeAudioOutputClusterDiscoverAttributes(uint8_t seqNum, En */ PacketBufferHandle encodeAudioOutputClusterReadAudioOutputListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadAudioOutputAudioOutputList", AUDIO_OUTPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadAudioOutputAudioOutputList", AudioOutput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(AudioOutput::Attributes::Ids::AudioOutputList); COMMAND_FOOTER(); } @@ -571,8 +359,11 @@ PacketBufferHandle encodeAudioOutputClusterReadAudioOutputListAttribute(uint8_t */ PacketBufferHandle encodeAudioOutputClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadAudioOutputClusterRevision", AUDIO_OUTPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadAudioOutputClusterRevision", AudioOutput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -593,8 +384,8 @@ PacketBufferHandle encodeAudioOutputClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeBarrierControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverBarrierControlAttributes", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBarrierControlAttributes", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -603,8 +394,11 @@ PacketBufferHandle encodeBarrierControlClusterDiscoverAttributes(uint8_t seqNum, */ PacketBufferHandle encodeBarrierControlClusterReadBarrierMovingStateAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBarrierControlBarrierMovingState", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadBarrierControlBarrierMovingState", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BarrierControl::Attributes::Ids::BarrierMovingState); COMMAND_FOOTER(); } @@ -613,8 +407,11 @@ PacketBufferHandle encodeBarrierControlClusterReadBarrierMovingStateAttribute(ui */ PacketBufferHandle encodeBarrierControlClusterReadBarrierSafetyStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBarrierControlBarrierSafetyStatus", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadBarrierControlBarrierSafetyStatus", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BarrierControl::Attributes::Ids::BarrierSafetyStatus); COMMAND_FOOTER(); } @@ -623,8 +420,11 @@ PacketBufferHandle encodeBarrierControlClusterReadBarrierSafetyStatusAttribute(u */ PacketBufferHandle encodeBarrierControlClusterReadBarrierCapabilitiesAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBarrierControlBarrierCapabilities", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadBarrierControlBarrierCapabilities", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BarrierControl::Attributes::Ids::BarrierCapabilities); COMMAND_FOOTER(); } @@ -633,8 +433,11 @@ PacketBufferHandle encodeBarrierControlClusterReadBarrierCapabilitiesAttribute(u */ PacketBufferHandle encodeBarrierControlClusterReadBarrierPositionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBarrierControlBarrierPosition", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000A); + COMMAND_HEADER("ReadBarrierControlBarrierPosition", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BarrierControl::Attributes::Ids::BarrierPosition); COMMAND_FOOTER(); } @@ -643,8 +446,11 @@ PacketBufferHandle encodeBarrierControlClusterReadBarrierPositionAttribute(uint8 */ PacketBufferHandle encodeBarrierControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBarrierControlClusterRevision", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadBarrierControlClusterRevision", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -678,8 +484,8 @@ PacketBufferHandle encodeBarrierControlClusterReadClusterRevisionAttribute(uint8 PacketBufferHandle encodeBasicClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverBasicAttributes", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBasicAttributes", Basic::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -688,8 +494,11 @@ PacketBufferHandle encodeBasicClusterDiscoverAttributes(uint8_t seqNum, Endpoint */ PacketBufferHandle encodeBasicClusterReadInteractionModelVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicInteractionModelVersion", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadBasicInteractionModelVersion", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::InteractionModelVersion); COMMAND_FOOTER(); } @@ -698,8 +507,11 @@ PacketBufferHandle encodeBasicClusterReadInteractionModelVersionAttribute(uint8_ */ PacketBufferHandle encodeBasicClusterReadVendorNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicVendorName", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadBasicVendorName", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::VendorName); COMMAND_FOOTER(); } @@ -708,8 +520,11 @@ PacketBufferHandle encodeBasicClusterReadVendorNameAttribute(uint8_t seqNum, End */ PacketBufferHandle encodeBasicClusterReadVendorIDAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicVendorID", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadBasicVendorID", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::VendorID); COMMAND_FOOTER(); } @@ -718,8 +533,11 @@ PacketBufferHandle encodeBasicClusterReadVendorIDAttribute(uint8_t seqNum, Endpo */ PacketBufferHandle encodeBasicClusterReadProductNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicProductName", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadBasicProductName", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::ProductName); COMMAND_FOOTER(); } @@ -728,8 +546,11 @@ PacketBufferHandle encodeBasicClusterReadProductNameAttribute(uint8_t seqNum, En */ PacketBufferHandle encodeBasicClusterReadProductIDAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicProductID", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0004); + COMMAND_HEADER("ReadBasicProductID", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::ProductID); COMMAND_FOOTER(); } @@ -738,15 +559,18 @@ PacketBufferHandle encodeBasicClusterReadProductIDAttribute(uint8_t seqNum, Endp */ PacketBufferHandle encodeBasicClusterReadUserLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicUserLabel", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0005); + COMMAND_HEADER("ReadBasicUserLabel", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::UserLabel); COMMAND_FOOTER(); } PacketBufferHandle encodeBasicClusterWriteUserLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint, chip::ByteSpan userLabel) { - COMMAND_HEADER("WriteBasicUserLabel", BASIC_CLUSTER_ID); + COMMAND_HEADER("WriteBasicUserLabel", Basic::Id); size_t userLabelStrLen = userLabel.size(); if (!CanCastTo(userLabelStrLen)) { @@ -756,8 +580,8 @@ PacketBufferHandle encodeBasicClusterWriteUserLabelAttribute(uint8_t seqNum, End buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0005) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(Basic::Attributes::Ids::UserLabel) .Put8(66) .Put(static_cast(userLabelStrLen)) .Put(userLabel.data(), userLabelStrLen); @@ -769,14 +593,17 @@ PacketBufferHandle encodeBasicClusterWriteUserLabelAttribute(uint8_t seqNum, End */ PacketBufferHandle encodeBasicClusterReadLocationAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicLocation", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0006); + COMMAND_HEADER("ReadBasicLocation", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::Location); COMMAND_FOOTER(); } PacketBufferHandle encodeBasicClusterWriteLocationAttribute(uint8_t seqNum, EndpointId destinationEndpoint, chip::ByteSpan location) { - COMMAND_HEADER("WriteBasicLocation", BASIC_CLUSTER_ID); + COMMAND_HEADER("WriteBasicLocation", Basic::Id); size_t locationStrLen = location.size(); if (!CanCastTo(locationStrLen)) { @@ -786,8 +613,8 @@ PacketBufferHandle encodeBasicClusterWriteLocationAttribute(uint8_t seqNum, Endp buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0006) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(Basic::Attributes::Ids::Location) .Put8(66) .Put(static_cast(locationStrLen)) .Put(location.data(), locationStrLen); @@ -799,8 +626,11 @@ PacketBufferHandle encodeBasicClusterWriteLocationAttribute(uint8_t seqNum, Endp */ PacketBufferHandle encodeBasicClusterReadHardwareVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicHardwareVersion", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0007); + COMMAND_HEADER("ReadBasicHardwareVersion", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::HardwareVersion); COMMAND_FOOTER(); } @@ -809,8 +639,11 @@ PacketBufferHandle encodeBasicClusterReadHardwareVersionAttribute(uint8_t seqNum */ PacketBufferHandle encodeBasicClusterReadHardwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicHardwareVersionString", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0008); + COMMAND_HEADER("ReadBasicHardwareVersionString", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::HardwareVersionString); COMMAND_FOOTER(); } @@ -819,8 +652,11 @@ PacketBufferHandle encodeBasicClusterReadHardwareVersionStringAttribute(uint8_t */ PacketBufferHandle encodeBasicClusterReadSoftwareVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicSoftwareVersion", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0009); + COMMAND_HEADER("ReadBasicSoftwareVersion", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::SoftwareVersion); COMMAND_FOOTER(); } @@ -829,8 +665,11 @@ PacketBufferHandle encodeBasicClusterReadSoftwareVersionAttribute(uint8_t seqNum */ PacketBufferHandle encodeBasicClusterReadSoftwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicSoftwareVersionString", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000A); + COMMAND_HEADER("ReadBasicSoftwareVersionString", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::SoftwareVersionString); COMMAND_FOOTER(); } @@ -839,8 +678,11 @@ PacketBufferHandle encodeBasicClusterReadSoftwareVersionStringAttribute(uint8_t */ PacketBufferHandle encodeBasicClusterReadManufacturingDateAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicManufacturingDate", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000B); + COMMAND_HEADER("ReadBasicManufacturingDate", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::ManufacturingDate); COMMAND_FOOTER(); } @@ -849,8 +691,11 @@ PacketBufferHandle encodeBasicClusterReadManufacturingDateAttribute(uint8_t seqN */ PacketBufferHandle encodeBasicClusterReadPartNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicPartNumber", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000C); + COMMAND_HEADER("ReadBasicPartNumber", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::PartNumber); COMMAND_FOOTER(); } @@ -859,8 +704,11 @@ PacketBufferHandle encodeBasicClusterReadPartNumberAttribute(uint8_t seqNum, End */ PacketBufferHandle encodeBasicClusterReadProductURLAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicProductURL", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000D); + COMMAND_HEADER("ReadBasicProductURL", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::ProductURL); COMMAND_FOOTER(); } @@ -869,8 +717,11 @@ PacketBufferHandle encodeBasicClusterReadProductURLAttribute(uint8_t seqNum, End */ PacketBufferHandle encodeBasicClusterReadProductLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicProductLabel", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000E); + COMMAND_HEADER("ReadBasicProductLabel", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::ProductLabel); COMMAND_FOOTER(); } @@ -879,8 +730,11 @@ PacketBufferHandle encodeBasicClusterReadProductLabelAttribute(uint8_t seqNum, E */ PacketBufferHandle encodeBasicClusterReadSerialNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicSerialNumber", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000F); + COMMAND_HEADER("ReadBasicSerialNumber", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::SerialNumber); COMMAND_FOOTER(); } @@ -889,19 +743,22 @@ PacketBufferHandle encodeBasicClusterReadSerialNumberAttribute(uint8_t seqNum, E */ PacketBufferHandle encodeBasicClusterReadLocalConfigDisabledAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicLocalConfigDisabled", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0010); + COMMAND_HEADER("ReadBasicLocalConfigDisabled", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::LocalConfigDisabled); COMMAND_FOOTER(); } PacketBufferHandle encodeBasicClusterWriteLocalConfigDisabledAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t localConfigDisabled) { - COMMAND_HEADER("WriteBasicLocalConfigDisabled", BASIC_CLUSTER_ID); + COMMAND_HEADER("WriteBasicLocalConfigDisabled", Basic::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0010) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(Basic::Attributes::Ids::LocalConfigDisabled) .Put8(16) .Put8(static_cast(localConfigDisabled)); COMMAND_FOOTER(); @@ -912,8 +769,11 @@ PacketBufferHandle encodeBasicClusterWriteLocalConfigDisabledAttribute(uint8_t s */ PacketBufferHandle encodeBasicClusterReadReachableAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicReachable", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_HEADER("ReadBasicReachable", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Basic::Attributes::Ids::Reachable); COMMAND_FOOTER(); } @@ -922,8 +782,11 @@ PacketBufferHandle encodeBasicClusterReadReachableAttribute(uint8_t seqNum, Endp */ PacketBufferHandle encodeBasicClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicClusterRevision", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadBasicClusterRevision", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -941,8 +804,8 @@ PacketBufferHandle encodeBasicClusterReadClusterRevisionAttribute(uint8_t seqNum PacketBufferHandle encodeBinaryInputBasicClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverBinaryInputBasicAttributes", BINARY_INPUT_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBinaryInputBasicAttributes", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -951,19 +814,22 @@ PacketBufferHandle encodeBinaryInputBasicClusterDiscoverAttributes(uint8_t seqNu */ PacketBufferHandle encodeBinaryInputBasicClusterReadOutOfServiceAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBinaryInputBasicOutOfService", BINARY_INPUT_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0051); + COMMAND_HEADER("ReadBinaryInputBasicOutOfService", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BinaryInputBasic::Attributes::Ids::OutOfService); COMMAND_FOOTER(); } PacketBufferHandle encodeBinaryInputBasicClusterWriteOutOfServiceAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t outOfService) { - COMMAND_HEADER("WriteBinaryInputBasicOutOfService", BINARY_INPUT_BASIC_CLUSTER_ID); + COMMAND_HEADER("WriteBinaryInputBasicOutOfService", BinaryInputBasic::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0051) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(BinaryInputBasic::Attributes::Ids::OutOfService) .Put8(16) .Put8(static_cast(outOfService)); COMMAND_FOOTER(); @@ -974,19 +840,22 @@ PacketBufferHandle encodeBinaryInputBasicClusterWriteOutOfServiceAttribute(uint8 */ PacketBufferHandle encodeBinaryInputBasicClusterReadPresentValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBinaryInputBasicPresentValue", BINARY_INPUT_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0055); + COMMAND_HEADER("ReadBinaryInputBasicPresentValue", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BinaryInputBasic::Attributes::Ids::PresentValue); COMMAND_FOOTER(); } PacketBufferHandle encodeBinaryInputBasicClusterWritePresentValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t presentValue) { - COMMAND_HEADER("WriteBinaryInputBasicPresentValue", BINARY_INPUT_BASIC_CLUSTER_ID); + COMMAND_HEADER("WriteBinaryInputBasicPresentValue", BinaryInputBasic::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0055) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(BinaryInputBasic::Attributes::Ids::PresentValue) .Put8(16) .Put8(static_cast(presentValue)); COMMAND_FOOTER(); @@ -995,12 +864,12 @@ PacketBufferHandle encodeBinaryInputBasicClusterWritePresentValueAttribute(uint8 PacketBufferHandle encodeBinaryInputBasicClusterConfigurePresentValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval) { - COMMAND_HEADER("ReportBinaryInputBasicPresentValue", BINARY_INPUT_BASIC_CLUSTER_ID); + COMMAND_HEADER("ReportBinaryInputBasicPresentValue", BinaryInputBasic::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0055) + .Put16(BinaryInputBasic::Attributes::Ids::PresentValue) .Put8(16) .Put16(minInterval) .Put16(maxInterval); @@ -1012,20 +881,23 @@ PacketBufferHandle encodeBinaryInputBasicClusterConfigurePresentValueAttribute(u */ PacketBufferHandle encodeBinaryInputBasicClusterReadStatusFlagsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBinaryInputBasicStatusFlags", BINARY_INPUT_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x006F); + COMMAND_HEADER("ReadBinaryInputBasicStatusFlags", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BinaryInputBasic::Attributes::Ids::StatusFlags); COMMAND_FOOTER(); } PacketBufferHandle encodeBinaryInputBasicClusterConfigureStatusFlagsAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval) { - COMMAND_HEADER("ReportBinaryInputBasicStatusFlags", BINARY_INPUT_BASIC_CLUSTER_ID); + COMMAND_HEADER("ReportBinaryInputBasicStatusFlags", BinaryInputBasic::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x006F) + .Put16(BinaryInputBasic::Attributes::Ids::StatusFlags) .Put8(24) .Put16(minInterval) .Put16(maxInterval); @@ -1037,8 +909,11 @@ PacketBufferHandle encodeBinaryInputBasicClusterConfigureStatusFlagsAttribute(ui */ PacketBufferHandle encodeBinaryInputBasicClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBinaryInputBasicClusterRevision", BINARY_INPUT_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadBinaryInputBasicClusterRevision", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -1055,8 +930,8 @@ PacketBufferHandle encodeBinaryInputBasicClusterReadClusterRevisionAttribute(uin PacketBufferHandle encodeBindingClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverBindingAttributes", BINDING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBindingAttributes", Binding::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -1065,8 +940,11 @@ PacketBufferHandle encodeBindingClusterDiscoverAttributes(uint8_t seqNum, Endpoi */ PacketBufferHandle encodeBindingClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBindingClusterRevision", BINDING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadBindingClusterRevision", Binding::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -1095,8 +973,8 @@ PacketBufferHandle encodeBindingClusterReadClusterRevisionAttribute(uint8_t seqN PacketBufferHandle encodeBridgedDeviceBasicClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverBridgedDeviceBasicAttributes", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBridgedDeviceBasicAttributes", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -1105,8 +983,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterDiscoverAttributes(uint8_t seq */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicVendorName", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadBridgedDeviceBasicVendorName", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::VendorName); COMMAND_FOOTER(); } @@ -1115,8 +996,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorNameAttribute(uint8_ */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorIDAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicVendorID", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadBridgedDeviceBasicVendorID", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::VendorID); COMMAND_FOOTER(); } @@ -1125,8 +1009,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorIDAttribute(uint8_t */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicProductName", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadBridgedDeviceBasicProductName", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::ProductName); COMMAND_FOOTER(); } @@ -1135,15 +1022,18 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductNameAttribute(uint8 */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadUserLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicUserLabel", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0005); + COMMAND_HEADER("ReadBridgedDeviceBasicUserLabel", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::UserLabel); COMMAND_FOOTER(); } PacketBufferHandle encodeBridgedDeviceBasicClusterWriteUserLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint, chip::ByteSpan userLabel) { - COMMAND_HEADER("WriteBridgedDeviceBasicUserLabel", BRIDGED_DEVICE_BASIC_CLUSTER_ID); + COMMAND_HEADER("WriteBridgedDeviceBasicUserLabel", BridgedDeviceBasic::Id); size_t userLabelStrLen = userLabel.size(); if (!CanCastTo(userLabelStrLen)) { @@ -1153,8 +1043,8 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterWriteUserLabelAttribute(uint8_ buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0005) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::UserLabel) .Put8(66) .Put(static_cast(userLabelStrLen)) .Put(userLabel.data(), userLabelStrLen); @@ -1166,8 +1056,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterWriteUserLabelAttribute(uint8_ */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersion", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0007); + COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersion", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::HardwareVersion); COMMAND_FOOTER(); } @@ -1176,8 +1069,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionAttribute(u */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersionString", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0008); + COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersionString", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::HardwareVersionString); COMMAND_FOOTER(); } @@ -1186,8 +1082,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionStringAttri */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersion", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0009); + COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersion", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::SoftwareVersion); COMMAND_FOOTER(); } @@ -1196,8 +1095,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionAttribute(u */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersionString", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000A); + COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersionString", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::SoftwareVersionString); COMMAND_FOOTER(); } @@ -1206,8 +1108,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionStringAttri */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadManufacturingDateAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicManufacturingDate", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000B); + COMMAND_HEADER("ReadBridgedDeviceBasicManufacturingDate", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::ManufacturingDate); COMMAND_FOOTER(); } @@ -1216,8 +1121,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadManufacturingDateAttribute */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadPartNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicPartNumber", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000C); + COMMAND_HEADER("ReadBridgedDeviceBasicPartNumber", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::PartNumber); COMMAND_FOOTER(); } @@ -1226,8 +1134,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadPartNumberAttribute(uint8_ */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductURLAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicProductURL", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000D); + COMMAND_HEADER("ReadBridgedDeviceBasicProductURL", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::ProductURL); COMMAND_FOOTER(); } @@ -1236,8 +1147,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductURLAttribute(uint8_ */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicProductLabel", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000E); + COMMAND_HEADER("ReadBridgedDeviceBasicProductLabel", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::ProductLabel); COMMAND_FOOTER(); } @@ -1246,8 +1160,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductLabelAttribute(uint */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSerialNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicSerialNumber", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000F); + COMMAND_HEADER("ReadBridgedDeviceBasicSerialNumber", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::SerialNumber); COMMAND_FOOTER(); } @@ -1256,8 +1173,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSerialNumberAttribute(uint */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadReachableAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicReachable", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_HEADER("ReadBridgedDeviceBasicReachable", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(BridgedDeviceBasic::Attributes::Ids::Reachable); COMMAND_FOOTER(); } @@ -1266,8 +1186,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadReachableAttribute(uint8_t */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicClusterRevision", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadBridgedDeviceBasicClusterRevision", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -1346,8 +1269,8 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadClusterRevisionAttribute(u PacketBufferHandle encodeColorControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverColorControlAttributes", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverColorControlAttributes", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -1356,20 +1279,23 @@ PacketBufferHandle encodeColorControlClusterDiscoverAttributes(uint8_t seqNum, E */ PacketBufferHandle encodeColorControlClusterReadCurrentHueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlCurrentHue", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadColorControlCurrentHue", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::CurrentHue); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterConfigureCurrentHueAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval, uint8_t change) { - COMMAND_HEADER("ReportColorControlCurrentHue", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("ReportColorControlCurrentHue", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(ColorControl::Attributes::Ids::CurrentHue) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -1382,8 +1308,11 @@ PacketBufferHandle encodeColorControlClusterConfigureCurrentHueAttribute(uint8_t */ PacketBufferHandle encodeColorControlClusterReadCurrentSaturationAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlCurrentSaturation", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadColorControlCurrentSaturation", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::CurrentSaturation); COMMAND_FOOTER(); } @@ -1391,12 +1320,12 @@ PacketBufferHandle encodeColorControlClusterConfigureCurrentSaturationAttribute( uint16_t minInterval, uint16_t maxInterval, uint8_t change) { - COMMAND_HEADER("ReportColorControlCurrentSaturation", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("ReportColorControlCurrentSaturation", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0001) + .Put16(ColorControl::Attributes::Ids::CurrentSaturation) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -1409,8 +1338,11 @@ PacketBufferHandle encodeColorControlClusterConfigureCurrentSaturationAttribute( */ PacketBufferHandle encodeColorControlClusterReadRemainingTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlRemainingTime", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadColorControlRemainingTime", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::RemainingTime); COMMAND_FOOTER(); } @@ -1419,20 +1351,23 @@ PacketBufferHandle encodeColorControlClusterReadRemainingTimeAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadCurrentXAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlCurrentX", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadColorControlCurrentX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::CurrentX); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterConfigureCurrentXAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportColorControlCurrentX", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("ReportColorControlCurrentX", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0003) + .Put16(ColorControl::Attributes::Ids::CurrentX) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -1445,20 +1380,23 @@ PacketBufferHandle encodeColorControlClusterConfigureCurrentXAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadCurrentYAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlCurrentY", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0004); + COMMAND_HEADER("ReadColorControlCurrentY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::CurrentY); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterConfigureCurrentYAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportColorControlCurrentY", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("ReportColorControlCurrentY", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0004) + .Put16(ColorControl::Attributes::Ids::CurrentY) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -1471,8 +1409,11 @@ PacketBufferHandle encodeColorControlClusterConfigureCurrentYAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadDriftCompensationAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlDriftCompensation", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0005); + COMMAND_HEADER("ReadColorControlDriftCompensation", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::DriftCompensation); COMMAND_FOOTER(); } @@ -1481,8 +1422,11 @@ PacketBufferHandle encodeColorControlClusterReadDriftCompensationAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadCompensationTextAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlCompensationText", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0006); + COMMAND_HEADER("ReadColorControlCompensationText", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::CompensationText); COMMAND_FOOTER(); } @@ -1491,8 +1435,11 @@ PacketBufferHandle encodeColorControlClusterReadCompensationTextAttribute(uint8_ */ PacketBufferHandle encodeColorControlClusterReadColorTemperatureAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorTemperature", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0007); + COMMAND_HEADER("ReadColorControlColorTemperature", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorTemperature); COMMAND_FOOTER(); } @@ -1500,12 +1447,12 @@ PacketBufferHandle encodeColorControlClusterConfigureColorTemperatureAttribute(u uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportColorControlColorTemperature", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("ReportColorControlColorTemperature", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0007) + .Put16(ColorControl::Attributes::Ids::ColorTemperature) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -1518,8 +1465,11 @@ PacketBufferHandle encodeColorControlClusterConfigureColorTemperatureAttribute(u */ PacketBufferHandle encodeColorControlClusterReadColorModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorMode", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0008); + COMMAND_HEADER("ReadColorControlColorMode", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorMode); COMMAND_FOOTER(); } @@ -1528,19 +1478,22 @@ PacketBufferHandle encodeColorControlClusterReadColorModeAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadColorControlOptionsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorControlOptions", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000F); + COMMAND_HEADER("ReadColorControlColorControlOptions", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorControlOptions); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorControlOptionsAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t colorControlOptions) { - COMMAND_HEADER("WriteColorControlColorControlOptions", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorControlOptions", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x000F) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorControlOptions) .Put8(24) .Put8(static_cast(colorControlOptions)); COMMAND_FOOTER(); @@ -1551,8 +1504,11 @@ PacketBufferHandle encodeColorControlClusterWriteColorControlOptionsAttribute(ui */ PacketBufferHandle encodeColorControlClusterReadNumberOfPrimariesAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlNumberOfPrimaries", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0010); + COMMAND_HEADER("ReadColorControlNumberOfPrimaries", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::NumberOfPrimaries); COMMAND_FOOTER(); } @@ -1561,8 +1517,11 @@ PacketBufferHandle encodeColorControlClusterReadNumberOfPrimariesAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary1XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary1X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_HEADER("ReadColorControlPrimary1X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary1X); COMMAND_FOOTER(); } @@ -1571,8 +1530,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary1XAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary1YAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary1Y", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0012); + COMMAND_HEADER("ReadColorControlPrimary1Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary1Y); COMMAND_FOOTER(); } @@ -1581,8 +1543,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary1YAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary1IntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary1Intensity", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0013); + COMMAND_HEADER("ReadColorControlPrimary1Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary1Intensity); COMMAND_FOOTER(); } @@ -1591,8 +1556,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary1IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary2XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary2X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0015); + COMMAND_HEADER("ReadColorControlPrimary2X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary2X); COMMAND_FOOTER(); } @@ -1601,8 +1569,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary2XAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary2YAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary2Y", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0016); + COMMAND_HEADER("ReadColorControlPrimary2Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary2Y); COMMAND_FOOTER(); } @@ -1611,8 +1582,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary2YAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary2IntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary2Intensity", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0017); + COMMAND_HEADER("ReadColorControlPrimary2Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary2Intensity); COMMAND_FOOTER(); } @@ -1621,8 +1595,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary2IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary3XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary3X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0019); + COMMAND_HEADER("ReadColorControlPrimary3X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary3X); COMMAND_FOOTER(); } @@ -1631,8 +1608,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary3XAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary3YAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary3Y", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001A); + COMMAND_HEADER("ReadColorControlPrimary3Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary3Y); COMMAND_FOOTER(); } @@ -1641,8 +1621,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary3YAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary3IntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary3Intensity", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001B); + COMMAND_HEADER("ReadColorControlPrimary3Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary3Intensity); COMMAND_FOOTER(); } @@ -1651,8 +1634,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary3IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary4XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary4X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0020); + COMMAND_HEADER("ReadColorControlPrimary4X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary4X); COMMAND_FOOTER(); } @@ -1661,8 +1647,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary4XAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary4YAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary4Y", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0021); + COMMAND_HEADER("ReadColorControlPrimary4Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary4Y); COMMAND_FOOTER(); } @@ -1671,8 +1660,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary4YAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary4IntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary4Intensity", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0022); + COMMAND_HEADER("ReadColorControlPrimary4Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary4Intensity); COMMAND_FOOTER(); } @@ -1681,8 +1673,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary4IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary5XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary5X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0024); + COMMAND_HEADER("ReadColorControlPrimary5X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary5X); COMMAND_FOOTER(); } @@ -1691,8 +1686,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary5XAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary5YAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary5Y", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0025); + COMMAND_HEADER("ReadColorControlPrimary5Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary5Y); COMMAND_FOOTER(); } @@ -1701,8 +1699,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary5YAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary5IntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary5Intensity", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0026); + COMMAND_HEADER("ReadColorControlPrimary5Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary5Intensity); COMMAND_FOOTER(); } @@ -1711,8 +1712,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary5IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary6XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary6X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0028); + COMMAND_HEADER("ReadColorControlPrimary6X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary6X); COMMAND_FOOTER(); } @@ -1721,8 +1725,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary6XAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary6YAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary6Y", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0029); + COMMAND_HEADER("ReadColorControlPrimary6Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary6Y); COMMAND_FOOTER(); } @@ -1731,8 +1738,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary6YAttribute(uint8_t seqNu */ PacketBufferHandle encodeColorControlClusterReadPrimary6IntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary6Intensity", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x002A); + COMMAND_HEADER("ReadColorControlPrimary6Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::Primary6Intensity); COMMAND_FOOTER(); } @@ -1741,19 +1751,22 @@ PacketBufferHandle encodeColorControlClusterReadPrimary6IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadWhitePointXAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlWhitePointX", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0030); + COMMAND_HEADER("ReadColorControlWhitePointX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::WhitePointX); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteWhitePointXAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t whitePointX) { - COMMAND_HEADER("WriteColorControlWhitePointX", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlWhitePointX", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0030) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::WhitePointX) .Put8(33) .Put16(static_cast(whitePointX)); COMMAND_FOOTER(); @@ -1764,19 +1777,22 @@ PacketBufferHandle encodeColorControlClusterWriteWhitePointXAttribute(uint8_t se */ PacketBufferHandle encodeColorControlClusterReadWhitePointYAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlWhitePointY", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0031); + COMMAND_HEADER("ReadColorControlWhitePointY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::WhitePointY); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteWhitePointYAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t whitePointY) { - COMMAND_HEADER("WriteColorControlWhitePointY", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlWhitePointY", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0031) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::WhitePointY) .Put8(33) .Put16(static_cast(whitePointY)); COMMAND_FOOTER(); @@ -1787,19 +1803,22 @@ PacketBufferHandle encodeColorControlClusterWriteWhitePointYAttribute(uint8_t se */ PacketBufferHandle encodeColorControlClusterReadColorPointRXAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointRX", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0032); + COMMAND_HEADER("ReadColorControlColorPointRX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointRX); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorPointRXAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t colorPointRX) { - COMMAND_HEADER("WriteColorControlColorPointRX", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorPointRX", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0032) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointRX) .Put8(33) .Put16(static_cast(colorPointRX)); COMMAND_FOOTER(); @@ -1810,19 +1829,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointRXAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadColorPointRYAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointRY", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0033); + COMMAND_HEADER("ReadColorControlColorPointRY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointRY); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorPointRYAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t colorPointRY) { - COMMAND_HEADER("WriteColorControlColorPointRY", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorPointRY", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0033) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointRY) .Put8(33) .Put16(static_cast(colorPointRY)); COMMAND_FOOTER(); @@ -1833,19 +1855,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointRYAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadColorPointRIntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointRIntensity", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0034); + COMMAND_HEADER("ReadColorControlColorPointRIntensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointRIntensity); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorPointRIntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t colorPointRIntensity) { - COMMAND_HEADER("WriteColorControlColorPointRIntensity", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorPointRIntensity", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0034) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointRIntensity) .Put8(32) .Put8(static_cast(colorPointRIntensity)); COMMAND_FOOTER(); @@ -1856,19 +1881,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointRIntensityAttribute(u */ PacketBufferHandle encodeColorControlClusterReadColorPointGXAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointGX", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0036); + COMMAND_HEADER("ReadColorControlColorPointGX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointGX); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorPointGXAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t colorPointGX) { - COMMAND_HEADER("WriteColorControlColorPointGX", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorPointGX", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0036) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointGX) .Put8(33) .Put16(static_cast(colorPointGX)); COMMAND_FOOTER(); @@ -1879,19 +1907,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointGXAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadColorPointGYAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointGY", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0037); + COMMAND_HEADER("ReadColorControlColorPointGY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointGY); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorPointGYAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t colorPointGY) { - COMMAND_HEADER("WriteColorControlColorPointGY", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorPointGY", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0037) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointGY) .Put8(33) .Put16(static_cast(colorPointGY)); COMMAND_FOOTER(); @@ -1902,19 +1933,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointGYAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadColorPointGIntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointGIntensity", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0038); + COMMAND_HEADER("ReadColorControlColorPointGIntensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointGIntensity); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorPointGIntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t colorPointGIntensity) { - COMMAND_HEADER("WriteColorControlColorPointGIntensity", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorPointGIntensity", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0038) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointGIntensity) .Put8(32) .Put8(static_cast(colorPointGIntensity)); COMMAND_FOOTER(); @@ -1925,19 +1959,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointGIntensityAttribute(u */ PacketBufferHandle encodeColorControlClusterReadColorPointBXAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointBX", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x003A); + COMMAND_HEADER("ReadColorControlColorPointBX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointBX); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorPointBXAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t colorPointBX) { - COMMAND_HEADER("WriteColorControlColorPointBX", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorPointBX", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x003A) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointBX) .Put8(33) .Put16(static_cast(colorPointBX)); COMMAND_FOOTER(); @@ -1948,19 +1985,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointBXAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadColorPointBYAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointBY", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x003B); + COMMAND_HEADER("ReadColorControlColorPointBY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointBY); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorPointBYAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t colorPointBY) { - COMMAND_HEADER("WriteColorControlColorPointBY", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorPointBY", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x003B) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointBY) .Put8(33) .Put16(static_cast(colorPointBY)); COMMAND_FOOTER(); @@ -1971,19 +2011,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointBYAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadColorPointBIntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointBIntensity", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x003C); + COMMAND_HEADER("ReadColorControlColorPointBIntensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointBIntensity); COMMAND_FOOTER(); } PacketBufferHandle encodeColorControlClusterWriteColorPointBIntensityAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t colorPointBIntensity) { - COMMAND_HEADER("WriteColorControlColorPointBIntensity", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlColorPointBIntensity", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x003C) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::ColorPointBIntensity) .Put8(32) .Put8(static_cast(colorPointBIntensity)); COMMAND_FOOTER(); @@ -1994,8 +2037,11 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointBIntensityAttribute(u */ PacketBufferHandle encodeColorControlClusterReadEnhancedCurrentHueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlEnhancedCurrentHue", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4000); + COMMAND_HEADER("ReadColorControlEnhancedCurrentHue", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::EnhancedCurrentHue); COMMAND_FOOTER(); } @@ -2004,8 +2050,11 @@ PacketBufferHandle encodeColorControlClusterReadEnhancedCurrentHueAttribute(uint */ PacketBufferHandle encodeColorControlClusterReadEnhancedColorModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlEnhancedColorMode", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4001); + COMMAND_HEADER("ReadColorControlEnhancedColorMode", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::EnhancedColorMode); COMMAND_FOOTER(); } @@ -2014,8 +2063,11 @@ PacketBufferHandle encodeColorControlClusterReadEnhancedColorModeAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadColorLoopActiveAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorLoopActive", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4002); + COMMAND_HEADER("ReadColorControlColorLoopActive", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorLoopActive); COMMAND_FOOTER(); } @@ -2024,8 +2076,11 @@ PacketBufferHandle encodeColorControlClusterReadColorLoopActiveAttribute(uint8_t */ PacketBufferHandle encodeColorControlClusterReadColorLoopDirectionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorLoopDirection", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4003); + COMMAND_HEADER("ReadColorControlColorLoopDirection", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorLoopDirection); COMMAND_FOOTER(); } @@ -2034,8 +2089,11 @@ PacketBufferHandle encodeColorControlClusterReadColorLoopDirectionAttribute(uint */ PacketBufferHandle encodeColorControlClusterReadColorLoopTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorLoopTime", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4004); + COMMAND_HEADER("ReadColorControlColorLoopTime", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorLoopTime); COMMAND_FOOTER(); } @@ -2044,8 +2102,11 @@ PacketBufferHandle encodeColorControlClusterReadColorLoopTimeAttribute(uint8_t s */ PacketBufferHandle encodeColorControlClusterReadColorCapabilitiesAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorCapabilities", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x400A); + COMMAND_HEADER("ReadColorControlColorCapabilities", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorCapabilities); COMMAND_FOOTER(); } @@ -2054,8 +2115,11 @@ PacketBufferHandle encodeColorControlClusterReadColorCapabilitiesAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadColorTempPhysicalMinAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorTempPhysicalMin", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x400B); + COMMAND_HEADER("ReadColorControlColorTempPhysicalMin", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorTempPhysicalMin); COMMAND_FOOTER(); } @@ -2064,8 +2128,11 @@ PacketBufferHandle encodeColorControlClusterReadColorTempPhysicalMinAttribute(ui */ PacketBufferHandle encodeColorControlClusterReadColorTempPhysicalMaxAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorTempPhysicalMax", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x400C); + COMMAND_HEADER("ReadColorControlColorTempPhysicalMax", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::ColorTempPhysicalMax); COMMAND_FOOTER(); } @@ -2075,8 +2142,11 @@ PacketBufferHandle encodeColorControlClusterReadColorTempPhysicalMaxAttribute(ui PacketBufferHandle encodeColorControlClusterReadCoupleColorTempToLevelMinMiredsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlCoupleColorTempToLevelMinMireds", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x400D); + COMMAND_HEADER("ReadColorControlCoupleColorTempToLevelMinMireds", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::CoupleColorTempToLevelMinMireds); COMMAND_FOOTER(); } @@ -2086,8 +2156,11 @@ PacketBufferHandle encodeColorControlClusterReadCoupleColorTempToLevelMinMiredsA PacketBufferHandle encodeColorControlClusterReadStartUpColorTemperatureMiredsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlStartUpColorTemperatureMireds", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4010); + COMMAND_HEADER("ReadColorControlStartUpColorTemperatureMireds", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ColorControl::Attributes::Ids::StartUpColorTemperatureMireds); COMMAND_FOOTER(); } @@ -2095,11 +2168,11 @@ PacketBufferHandle encodeColorControlClusterWriteStartUpColorTemperatureMiredsAt EndpointId destinationEndpoint, uint16_t startUpColorTemperatureMireds) { - COMMAND_HEADER("WriteColorControlStartUpColorTemperatureMireds", COLOR_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WriteColorControlStartUpColorTemperatureMireds", ColorControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x4010) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(ColorControl::Attributes::Ids::StartUpColorTemperatureMireds) .Put8(33) .Put16(static_cast(startUpColorTemperatureMireds)); COMMAND_FOOTER(); @@ -2110,8 +2183,11 @@ PacketBufferHandle encodeColorControlClusterWriteStartUpColorTemperatureMiredsAt */ PacketBufferHandle encodeColorControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlClusterRevision", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadColorControlClusterRevision", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2130,8 +2206,8 @@ PacketBufferHandle encodeColorControlClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeContentLauncherClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverContentLauncherAttributes", CONTENT_LAUNCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverContentLauncherAttributes", ContentLauncher::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2140,8 +2216,11 @@ PacketBufferHandle encodeContentLauncherClusterDiscoverAttributes(uint8_t seqNum */ PacketBufferHandle encodeContentLauncherClusterReadAcceptsHeaderListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadContentLauncherAcceptsHeaderList", CONTENT_LAUNCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadContentLauncherAcceptsHeaderList", ContentLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ContentLauncher::Attributes::Ids::AcceptsHeaderList); COMMAND_FOOTER(); } @@ -2150,8 +2229,11 @@ PacketBufferHandle encodeContentLauncherClusterReadAcceptsHeaderListAttribute(ui */ PacketBufferHandle encodeContentLauncherClusterReadSupportedStreamingTypesAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadContentLauncherSupportedStreamingTypes", CONTENT_LAUNCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadContentLauncherSupportedStreamingTypes", ContentLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ContentLauncher::Attributes::Ids::SupportedStreamingTypes); COMMAND_FOOTER(); } @@ -2160,8 +2242,11 @@ PacketBufferHandle encodeContentLauncherClusterReadSupportedStreamingTypesAttrib */ PacketBufferHandle encodeContentLauncherClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadContentLauncherClusterRevision", CONTENT_LAUNCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadContentLauncherClusterRevision", ContentLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2180,8 +2265,8 @@ PacketBufferHandle encodeContentLauncherClusterReadClusterRevisionAttribute(uint PacketBufferHandle encodeDescriptorClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverDescriptorAttributes", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverDescriptorAttributes", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2190,8 +2275,11 @@ PacketBufferHandle encodeDescriptorClusterDiscoverAttributes(uint8_t seqNum, End */ PacketBufferHandle encodeDescriptorClusterReadDeviceListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDescriptorDeviceList", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadDescriptorDeviceList", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Descriptor::Attributes::Ids::DeviceList); COMMAND_FOOTER(); } @@ -2200,8 +2288,11 @@ PacketBufferHandle encodeDescriptorClusterReadDeviceListAttribute(uint8_t seqNum */ PacketBufferHandle encodeDescriptorClusterReadServerListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDescriptorServerList", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadDescriptorServerList", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Descriptor::Attributes::Ids::ServerList); COMMAND_FOOTER(); } @@ -2210,8 +2301,11 @@ PacketBufferHandle encodeDescriptorClusterReadServerListAttribute(uint8_t seqNum */ PacketBufferHandle encodeDescriptorClusterReadClientListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDescriptorClientList", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadDescriptorClientList", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Descriptor::Attributes::Ids::ClientList); COMMAND_FOOTER(); } @@ -2220,8 +2314,11 @@ PacketBufferHandle encodeDescriptorClusterReadClientListAttribute(uint8_t seqNum */ PacketBufferHandle encodeDescriptorClusterReadPartsListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDescriptorPartsList", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadDescriptorPartsList", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Descriptor::Attributes::Ids::PartsList); COMMAND_FOOTER(); } @@ -2230,8 +2327,11 @@ PacketBufferHandle encodeDescriptorClusterReadPartsListAttribute(uint8_t seqNum, */ PacketBufferHandle encodeDescriptorClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDescriptorClusterRevision", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadDescriptorClusterRevision", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2246,8 +2346,8 @@ PacketBufferHandle encodeDescriptorClusterReadClusterRevisionAttribute(uint8_t s PacketBufferHandle encodeDiagnosticLogsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverDiagnosticLogsAttributes", DIAGNOSTIC_LOGS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverDiagnosticLogsAttributes", DiagnosticLogs::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2288,8 +2388,8 @@ PacketBufferHandle encodeDiagnosticLogsClusterDiscoverAttributes(uint8_t seqNum, PacketBufferHandle encodeDoorLockClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverDoorLockAttributes", DOOR_LOCK_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverDoorLockAttributes", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2298,20 +2398,23 @@ PacketBufferHandle encodeDoorLockClusterDiscoverAttributes(uint8_t seqNum, Endpo */ PacketBufferHandle encodeDoorLockClusterReadLockStateAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDoorLockLockState", DOOR_LOCK_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadDoorLockLockState", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(DoorLock::Attributes::Ids::LockState); COMMAND_FOOTER(); } PacketBufferHandle encodeDoorLockClusterConfigureLockStateAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval) { - COMMAND_HEADER("ReportDoorLockLockState", DOOR_LOCK_CLUSTER_ID); + COMMAND_HEADER("ReportDoorLockLockState", DoorLock::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(DoorLock::Attributes::Ids::LockState) .Put8(48) .Put16(minInterval) .Put16(maxInterval); @@ -2323,8 +2426,11 @@ PacketBufferHandle encodeDoorLockClusterConfigureLockStateAttribute(uint8_t seqN */ PacketBufferHandle encodeDoorLockClusterReadLockTypeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDoorLockLockType", DOOR_LOCK_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadDoorLockLockType", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(DoorLock::Attributes::Ids::LockType); COMMAND_FOOTER(); } @@ -2333,8 +2439,11 @@ PacketBufferHandle encodeDoorLockClusterReadLockTypeAttribute(uint8_t seqNum, En */ PacketBufferHandle encodeDoorLockClusterReadActuatorEnabledAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDoorLockActuatorEnabled", DOOR_LOCK_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadDoorLockActuatorEnabled", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(DoorLock::Attributes::Ids::ActuatorEnabled); COMMAND_FOOTER(); } @@ -2343,8 +2452,11 @@ PacketBufferHandle encodeDoorLockClusterReadActuatorEnabledAttribute(uint8_t seq */ PacketBufferHandle encodeDoorLockClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDoorLockClusterRevision", DOOR_LOCK_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadDoorLockClusterRevision", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2365,8 +2477,8 @@ PacketBufferHandle encodeDoorLockClusterReadClusterRevisionAttribute(uint8_t seq PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverEthernetNetworkDiagnosticsAttributes", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverEthernetNetworkDiagnosticsAttributes", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2375,8 +2487,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterDiscoverAttributes(uin */ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadPacketRxCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsPacketRxCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsPacketRxCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(EthernetNetworkDiagnostics::Attributes::Ids::PacketRxCount); COMMAND_FOOTER(); } @@ -2385,8 +2500,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadPacketRxCountAttri */ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadPacketTxCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsPacketTxCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsPacketTxCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(EthernetNetworkDiagnostics::Attributes::Ids::PacketTxCount); COMMAND_FOOTER(); } @@ -2395,8 +2513,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadPacketTxCountAttri */ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadTxErrCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsTxErrCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0004); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsTxErrCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(EthernetNetworkDiagnostics::Attributes::Ids::TxErrCount); COMMAND_FOOTER(); } @@ -2406,8 +2527,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadTxErrCountAttribut PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadCollisionCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsCollisionCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0005); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsCollisionCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(EthernetNetworkDiagnostics::Attributes::Ids::CollisionCount); COMMAND_FOOTER(); } @@ -2416,8 +2540,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadCollisionCountAttr */ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadOverrunCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsOverrunCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0006); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsOverrunCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(EthernetNetworkDiagnostics::Attributes::Ids::OverrunCount); COMMAND_FOOTER(); } @@ -2427,8 +2554,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadOverrunCountAttrib PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsClusterRevision", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsClusterRevision", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2444,8 +2574,8 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadClusterRevisionAtt PacketBufferHandle encodeFixedLabelClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverFixedLabelAttributes", FIXED_LABEL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverFixedLabelAttributes", FixedLabel::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2454,8 +2584,11 @@ PacketBufferHandle encodeFixedLabelClusterDiscoverAttributes(uint8_t seqNum, End */ PacketBufferHandle encodeFixedLabelClusterReadLabelListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFixedLabelLabelList", FIXED_LABEL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadFixedLabelLabelList", FixedLabel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(FixedLabel::Attributes::Ids::LabelList); COMMAND_FOOTER(); } @@ -2464,9 +2597,12 @@ PacketBufferHandle encodeFixedLabelClusterReadLabelListAttribute(uint8_t seqNum, */ PacketBufferHandle encodeFixedLabelClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFixedLabelClusterRevision", FIXED_LABEL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); - COMMAND_FOOTER(); + COMMAND_HEADER("ReadFixedLabelClusterRevision", FixedLabel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); + COMMAND_FOOTER(); } /*----------------------------------------------------------------------------*\ @@ -2485,8 +2621,8 @@ PacketBufferHandle encodeFixedLabelClusterReadClusterRevisionAttribute(uint8_t s PacketBufferHandle encodeGeneralCommissioningClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverGeneralCommissioningAttributes", GENERAL_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverGeneralCommissioningAttributes", GeneralCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2495,8 +2631,11 @@ PacketBufferHandle encodeGeneralCommissioningClusterDiscoverAttributes(uint8_t s */ PacketBufferHandle encodeGeneralCommissioningClusterReadFabricIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralCommissioningFabricId", GENERAL_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadGeneralCommissioningFabricId", GeneralCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(GeneralCommissioning::Attributes::Ids::FabricId); COMMAND_FOOTER(); } @@ -2505,19 +2644,22 @@ PacketBufferHandle encodeGeneralCommissioningClusterReadFabricIdAttribute(uint8_ */ PacketBufferHandle encodeGeneralCommissioningClusterReadBreadcrumbAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralCommissioningBreadcrumb", GENERAL_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadGeneralCommissioningBreadcrumb", GeneralCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(GeneralCommissioning::Attributes::Ids::Breadcrumb); COMMAND_FOOTER(); } PacketBufferHandle encodeGeneralCommissioningClusterWriteBreadcrumbAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint64_t breadcrumb) { - COMMAND_HEADER("WriteGeneralCommissioningBreadcrumb", GENERAL_COMMISSIONING_CLUSTER_ID); + COMMAND_HEADER("WriteGeneralCommissioningBreadcrumb", GeneralCommissioning::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0001) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(GeneralCommissioning::Attributes::Ids::Breadcrumb) .Put8(39) .Put64(static_cast(breadcrumb)); COMMAND_FOOTER(); @@ -2528,8 +2670,11 @@ PacketBufferHandle encodeGeneralCommissioningClusterWriteBreadcrumbAttribute(uin */ PacketBufferHandle encodeGeneralCommissioningClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralCommissioningClusterRevision", GENERAL_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadGeneralCommissioningClusterRevision", GeneralCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2546,8 +2691,8 @@ PacketBufferHandle encodeGeneralCommissioningClusterReadClusterRevisionAttribute PacketBufferHandle encodeGeneralDiagnosticsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverGeneralDiagnosticsAttributes", GENERAL_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverGeneralDiagnosticsAttributes", GeneralDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2556,8 +2701,11 @@ PacketBufferHandle encodeGeneralDiagnosticsClusterDiscoverAttributes(uint8_t seq */ PacketBufferHandle encodeGeneralDiagnosticsClusterReadNetworkInterfacesAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralDiagnosticsNetworkInterfaces", GENERAL_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadGeneralDiagnosticsNetworkInterfaces", GeneralDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(GeneralDiagnostics::Attributes::Ids::NetworkInterfaces); COMMAND_FOOTER(); } @@ -2566,8 +2714,11 @@ PacketBufferHandle encodeGeneralDiagnosticsClusterReadNetworkInterfacesAttribute */ PacketBufferHandle encodeGeneralDiagnosticsClusterReadRebootCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralDiagnosticsRebootCount", GENERAL_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadGeneralDiagnosticsRebootCount", GeneralDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(GeneralDiagnostics::Attributes::Ids::RebootCount); COMMAND_FOOTER(); } @@ -2576,8 +2727,11 @@ PacketBufferHandle encodeGeneralDiagnosticsClusterReadRebootCountAttribute(uint8 */ PacketBufferHandle encodeGeneralDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralDiagnosticsClusterRevision", GENERAL_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadGeneralDiagnosticsClusterRevision", GeneralDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2594,8 +2748,8 @@ PacketBufferHandle encodeGeneralDiagnosticsClusterReadClusterRevisionAttribute(u PacketBufferHandle encodeGroupKeyManagementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverGroupKeyManagementAttributes", GROUP_KEY_MANAGEMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverGroupKeyManagementAttributes", GroupKeyManagement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2604,8 +2758,11 @@ PacketBufferHandle encodeGroupKeyManagementClusterDiscoverAttributes(uint8_t seq */ PacketBufferHandle encodeGroupKeyManagementClusterReadGroupsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGroupKeyManagementGroups", GROUP_KEY_MANAGEMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadGroupKeyManagementGroups", GroupKeyManagement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(GroupKeyManagement::Attributes::Ids::Groups); COMMAND_FOOTER(); } @@ -2614,8 +2771,11 @@ PacketBufferHandle encodeGroupKeyManagementClusterReadGroupsAttribute(uint8_t se */ PacketBufferHandle encodeGroupKeyManagementClusterReadGroupKeysAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGroupKeyManagementGroupKeys", GROUP_KEY_MANAGEMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadGroupKeyManagementGroupKeys", GroupKeyManagement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(GroupKeyManagement::Attributes::Ids::GroupKeys); COMMAND_FOOTER(); } @@ -2624,8 +2784,11 @@ PacketBufferHandle encodeGroupKeyManagementClusterReadGroupKeysAttribute(uint8_t */ PacketBufferHandle encodeGroupKeyManagementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGroupKeyManagementClusterRevision", GROUP_KEY_MANAGEMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadGroupKeyManagementClusterRevision", GroupKeyManagement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2647,8 +2810,8 @@ PacketBufferHandle encodeGroupKeyManagementClusterReadClusterRevisionAttribute(u PacketBufferHandle encodeGroupsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverGroupsAttributes", GROUPS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverGroupsAttributes", Groups::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2657,8 +2820,11 @@ PacketBufferHandle encodeGroupsClusterDiscoverAttributes(uint8_t seqNum, Endpoin */ PacketBufferHandle encodeGroupsClusterReadNameSupportAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGroupsNameSupport", GROUPS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadGroupsNameSupport", Groups::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Groups::Attributes::Ids::NameSupport); COMMAND_FOOTER(); } @@ -2667,8 +2833,11 @@ PacketBufferHandle encodeGroupsClusterReadNameSupportAttribute(uint8_t seqNum, E */ PacketBufferHandle encodeGroupsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGroupsClusterRevision", GROUPS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadGroupsClusterRevision", Groups::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2686,8 +2855,8 @@ PacketBufferHandle encodeGroupsClusterReadClusterRevisionAttribute(uint8_t seqNu PacketBufferHandle encodeIdentifyClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverIdentifyAttributes", IDENTIFY_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverIdentifyAttributes", Identify::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2696,19 +2865,22 @@ PacketBufferHandle encodeIdentifyClusterDiscoverAttributes(uint8_t seqNum, Endpo */ PacketBufferHandle encodeIdentifyClusterReadIdentifyTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadIdentifyIdentifyTime", IDENTIFY_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadIdentifyIdentifyTime", Identify::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Identify::Attributes::Ids::IdentifyTime); COMMAND_FOOTER(); } PacketBufferHandle encodeIdentifyClusterWriteIdentifyTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t identifyTime) { - COMMAND_HEADER("WriteIdentifyIdentifyTime", IDENTIFY_CLUSTER_ID); + COMMAND_HEADER("WriteIdentifyIdentifyTime", Identify::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0000) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(Identify::Attributes::Ids::IdentifyTime) .Put8(33) .Put16(static_cast(identifyTime)); COMMAND_FOOTER(); @@ -2719,8 +2891,11 @@ PacketBufferHandle encodeIdentifyClusterWriteIdentifyTimeAttribute(uint8_t seqNu */ PacketBufferHandle encodeIdentifyClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadIdentifyClusterRevision", IDENTIFY_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadIdentifyClusterRevision", Identify::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2736,8 +2911,8 @@ PacketBufferHandle encodeIdentifyClusterReadClusterRevisionAttribute(uint8_t seq PacketBufferHandle encodeKeypadInputClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverKeypadInputAttributes", KEYPAD_INPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverKeypadInputAttributes", KeypadInput::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2746,8 +2921,11 @@ PacketBufferHandle encodeKeypadInputClusterDiscoverAttributes(uint8_t seqNum, En */ PacketBufferHandle encodeKeypadInputClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadKeypadInputClusterRevision", KEYPAD_INPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadKeypadInputClusterRevision", KeypadInput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2771,8 +2949,8 @@ PacketBufferHandle encodeKeypadInputClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeLevelControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverLevelControlAttributes", LEVEL_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverLevelControlAttributes", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2781,8 +2959,11 @@ PacketBufferHandle encodeLevelControlClusterDiscoverAttributes(uint8_t seqNum, E */ PacketBufferHandle encodeLevelControlClusterReadCurrentLevelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadLevelControlCurrentLevel", LEVEL_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadLevelControlCurrentLevel", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(LevelControl::Attributes::Ids::CurrentLevel); COMMAND_FOOTER(); } @@ -2790,12 +2971,12 @@ PacketBufferHandle encodeLevelControlClusterConfigureCurrentLevelAttribute(uint8 uint16_t minInterval, uint16_t maxInterval, uint8_t change) { - COMMAND_HEADER("ReportLevelControlCurrentLevel", LEVEL_CONTROL_CLUSTER_ID); + COMMAND_HEADER("ReportLevelControlCurrentLevel", LevelControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(LevelControl::Attributes::Ids::CurrentLevel) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -2808,8 +2989,11 @@ PacketBufferHandle encodeLevelControlClusterConfigureCurrentLevelAttribute(uint8 */ PacketBufferHandle encodeLevelControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadLevelControlClusterRevision", LEVEL_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadLevelControlClusterRevision", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2825,8 +3009,8 @@ PacketBufferHandle encodeLevelControlClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeLowPowerClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverLowPowerAttributes", LOW_POWER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverLowPowerAttributes", LowPower::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2835,8 +3019,11 @@ PacketBufferHandle encodeLowPowerClusterDiscoverAttributes(uint8_t seqNum, Endpo */ PacketBufferHandle encodeLowPowerClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadLowPowerClusterRevision", LOW_POWER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadLowPowerClusterRevision", LowPower::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2856,8 +3043,8 @@ PacketBufferHandle encodeLowPowerClusterReadClusterRevisionAttribute(uint8_t seq PacketBufferHandle encodeMediaInputClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverMediaInputAttributes", MEDIA_INPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverMediaInputAttributes", MediaInput::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2866,8 +3053,11 @@ PacketBufferHandle encodeMediaInputClusterDiscoverAttributes(uint8_t seqNum, End */ PacketBufferHandle encodeMediaInputClusterReadMediaInputListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadMediaInputMediaInputList", MEDIA_INPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadMediaInputMediaInputList", MediaInput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(MediaInput::Attributes::Ids::MediaInputList); COMMAND_FOOTER(); } @@ -2876,8 +3066,11 @@ PacketBufferHandle encodeMediaInputClusterReadMediaInputListAttribute(uint8_t se */ PacketBufferHandle encodeMediaInputClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadMediaInputClusterRevision", MEDIA_INPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadMediaInputClusterRevision", MediaInput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2903,8 +3096,8 @@ PacketBufferHandle encodeMediaInputClusterReadClusterRevisionAttribute(uint8_t s PacketBufferHandle encodeMediaPlaybackClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverMediaPlaybackAttributes", MEDIA_PLAYBACK_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverMediaPlaybackAttributes", MediaPlayback::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2913,8 +3106,11 @@ PacketBufferHandle encodeMediaPlaybackClusterDiscoverAttributes(uint8_t seqNum, */ PacketBufferHandle encodeMediaPlaybackClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadMediaPlaybackClusterRevision", MEDIA_PLAYBACK_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadMediaPlaybackClusterRevision", MediaPlayback::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2938,8 +3134,8 @@ PacketBufferHandle encodeMediaPlaybackClusterReadClusterRevisionAttribute(uint8_ PacketBufferHandle encodeNetworkCommissioningClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverNetworkCommissioningAttributes", NETWORK_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverNetworkCommissioningAttributes", NetworkCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2948,8 +3144,11 @@ PacketBufferHandle encodeNetworkCommissioningClusterDiscoverAttributes(uint8_t s */ PacketBufferHandle encodeNetworkCommissioningClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadNetworkCommissioningClusterRevision", NETWORK_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadNetworkCommissioningClusterRevision", NetworkCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2967,8 +3166,8 @@ PacketBufferHandle encodeNetworkCommissioningClusterReadClusterRevisionAttribute PacketBufferHandle encodeOtaSoftwareUpdateServerClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverOtaSoftwareUpdateServerAttributes", OTA_SERVER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverOtaSoftwareUpdateServerAttributes", OtaSoftwareUpdateServer::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2977,8 +3176,11 @@ PacketBufferHandle encodeOtaSoftwareUpdateServerClusterDiscoverAttributes(uint8_ */ PacketBufferHandle encodeOtaSoftwareUpdateServerClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOtaSoftwareUpdateServerClusterRevision", OTA_SERVER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadOtaSoftwareUpdateServerClusterRevision", OtaSoftwareUpdateServer::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3002,8 +3204,8 @@ PacketBufferHandle encodeOtaSoftwareUpdateServerClusterReadClusterRevisionAttrib PacketBufferHandle encodeOnOffClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverOnOffAttributes", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverOnOffAttributes", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3012,20 +3214,23 @@ PacketBufferHandle encodeOnOffClusterDiscoverAttributes(uint8_t seqNum, Endpoint */ PacketBufferHandle encodeOnOffClusterReadOnOffAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOnOffOnOff", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadOnOffOnOff", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(OnOff::Attributes::Ids::OnOff); COMMAND_FOOTER(); } PacketBufferHandle encodeOnOffClusterConfigureOnOffAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval) { - COMMAND_HEADER("ReportOnOffOnOff", ON_OFF_CLUSTER_ID); + COMMAND_HEADER("ReportOnOffOnOff", OnOff::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(OnOff::Attributes::Ids::OnOff) .Put8(16) .Put16(minInterval) .Put16(maxInterval); @@ -3037,8 +3242,11 @@ PacketBufferHandle encodeOnOffClusterConfigureOnOffAttribute(uint8_t seqNum, End */ PacketBufferHandle encodeOnOffClusterReadGlobalSceneControlAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOnOffGlobalSceneControl", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4000); + COMMAND_HEADER("ReadOnOffGlobalSceneControl", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(OnOff::Attributes::Ids::GlobalSceneControl); COMMAND_FOOTER(); } @@ -3047,18 +3255,21 @@ PacketBufferHandle encodeOnOffClusterReadGlobalSceneControlAttribute(uint8_t seq */ PacketBufferHandle encodeOnOffClusterReadOnTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOnOffOnTime", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4001); + COMMAND_HEADER("ReadOnOffOnTime", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(OnOff::Attributes::Ids::OnTime); COMMAND_FOOTER(); } PacketBufferHandle encodeOnOffClusterWriteOnTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t onTime) { - COMMAND_HEADER("WriteOnOffOnTime", ON_OFF_CLUSTER_ID); + COMMAND_HEADER("WriteOnOffOnTime", OnOff::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x4001) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(OnOff::Attributes::Ids::OnTime) .Put8(33) .Put16(static_cast(onTime)); COMMAND_FOOTER(); @@ -3069,18 +3280,21 @@ PacketBufferHandle encodeOnOffClusterWriteOnTimeAttribute(uint8_t seqNum, Endpoi */ PacketBufferHandle encodeOnOffClusterReadOffWaitTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOnOffOffWaitTime", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4002); + COMMAND_HEADER("ReadOnOffOffWaitTime", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(OnOff::Attributes::Ids::OffWaitTime); COMMAND_FOOTER(); } PacketBufferHandle encodeOnOffClusterWriteOffWaitTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t offWaitTime) { - COMMAND_HEADER("WriteOnOffOffWaitTime", ON_OFF_CLUSTER_ID); + COMMAND_HEADER("WriteOnOffOffWaitTime", OnOff::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x4002) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(OnOff::Attributes::Ids::OffWaitTime) .Put8(33) .Put16(static_cast(offWaitTime)); COMMAND_FOOTER(); @@ -3091,19 +3305,22 @@ PacketBufferHandle encodeOnOffClusterWriteOffWaitTimeAttribute(uint8_t seqNum, E */ PacketBufferHandle encodeOnOffClusterReadStartUpOnOffAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOnOffStartUpOnOff", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x4003); + COMMAND_HEADER("ReadOnOffStartUpOnOff", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(OnOff::Attributes::Ids::StartUpOnOff); COMMAND_FOOTER(); } PacketBufferHandle encodeOnOffClusterWriteStartUpOnOffAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t startUpOnOff) { - COMMAND_HEADER("WriteOnOffStartUpOnOff", ON_OFF_CLUSTER_ID); + COMMAND_HEADER("WriteOnOffStartUpOnOff", OnOff::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x4003) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(OnOff::Attributes::Ids::StartUpOnOff) .Put8(48) .Put8(static_cast(startUpOnOff)); COMMAND_FOOTER(); @@ -3114,8 +3331,11 @@ PacketBufferHandle encodeOnOffClusterWriteStartUpOnOffAttribute(uint8_t seqNum, */ PacketBufferHandle encodeOnOffClusterReadFeatureMapAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOnOffFeatureMap", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFC); + COMMAND_HEADER("ReadOnOffFeatureMap", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::FeatureMap); COMMAND_FOOTER(); } @@ -3124,8 +3344,11 @@ PacketBufferHandle encodeOnOffClusterReadFeatureMapAttribute(uint8_t seqNum, End */ PacketBufferHandle encodeOnOffClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOnOffClusterRevision", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadOnOffClusterRevision", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3149,8 +3372,8 @@ PacketBufferHandle encodeOnOffClusterReadClusterRevisionAttribute(uint8_t seqNum PacketBufferHandle encodeOperationalCredentialsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverOperationalCredentialsAttributes", OPERATIONAL_CREDENTIALS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverOperationalCredentialsAttributes", OperationalCredentials::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3159,8 +3382,11 @@ PacketBufferHandle encodeOperationalCredentialsClusterDiscoverAttributes(uint8_t */ PacketBufferHandle encodeOperationalCredentialsClusterReadFabricsListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOperationalCredentialsFabricsList", OPERATIONAL_CREDENTIALS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadOperationalCredentialsFabricsList", OperationalCredentials::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(OperationalCredentials::Attributes::Ids::FabricsList); COMMAND_FOOTER(); } @@ -3169,8 +3395,11 @@ PacketBufferHandle encodeOperationalCredentialsClusterReadFabricsListAttribute(u */ PacketBufferHandle encodeOperationalCredentialsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOperationalCredentialsClusterRevision", OPERATIONAL_CREDENTIALS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadOperationalCredentialsClusterRevision", OperationalCredentials::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3188,8 +3417,8 @@ PacketBufferHandle encodeOperationalCredentialsClusterReadClusterRevisionAttribu PacketBufferHandle encodePressureMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3198,8 +3427,11 @@ PacketBufferHandle encodePressureMeasurementClusterDiscoverAttributes(uint8_t se */ PacketBufferHandle encodePressureMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadPressureMeasurementMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PressureMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -3207,12 +3439,12 @@ PacketBufferHandle encodePressureMeasurementClusterConfigureMeasuredValueAttribu uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportPressureMeasurementMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); + COMMAND_HEADER("ReportPressureMeasurementMeasuredValue", PressureMeasurement::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(PressureMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -3225,8 +3457,11 @@ PacketBufferHandle encodePressureMeasurementClusterConfigureMeasuredValueAttribu */ PacketBufferHandle encodePressureMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PressureMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -3235,8 +3470,11 @@ PacketBufferHandle encodePressureMeasurementClusterReadMinMeasuredValueAttribute */ PacketBufferHandle encodePressureMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PressureMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -3245,8 +3483,11 @@ PacketBufferHandle encodePressureMeasurementClusterReadMaxMeasuredValueAttribute */ PacketBufferHandle encodePressureMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3268,8 +3509,8 @@ PacketBufferHandle encodePressureMeasurementClusterReadClusterRevisionAttribute( PacketBufferHandle encodePumpConfigurationAndControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverPumpConfigurationAndControlAttributes", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPumpConfigurationAndControlAttributes", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3278,8 +3519,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterDiscoverAttributes(ui */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxPressureAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlMaxPressure", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxPressure", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::MaxPressure); COMMAND_FOOTER(); } @@ -3288,8 +3532,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxPressureAttrib */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxSpeedAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlMaxSpeed", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxSpeed", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::MaxSpeed); COMMAND_FOOTER(); } @@ -3298,8 +3545,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxSpeedAttribute */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxFlowAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlMaxFlow", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxFlow", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::MaxFlow); COMMAND_FOOTER(); } @@ -3309,8 +3559,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxFlowAttribute( PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveOperationModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveOperationMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveOperationMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::EffectiveOperationMode); COMMAND_FOOTER(); } @@ -3320,8 +3573,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveOperatio PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveControlModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveControlMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0012); + COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveControlMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::EffectiveControlMode); COMMAND_FOOTER(); } @@ -3330,8 +3586,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveControlM */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadCapacityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlCapacity", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0013); + COMMAND_HEADER("ReadPumpConfigurationAndControlCapacity", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::Capacity); COMMAND_FOOTER(); } @@ -3340,12 +3599,12 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterConfigureCapacityAttr uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportPumpConfigurationAndControlCapacity", PUMP_CONFIG_CONTROL_CLUSTER_ID); + COMMAND_HEADER("ReportPumpConfigurationAndControlCapacity", PumpConfigurationAndControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0013) + .Put16(PumpConfigurationAndControl::Attributes::Ids::Capacity) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -3359,8 +3618,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterConfigureCapacityAttr PacketBufferHandle encodePumpConfigurationAndControlClusterReadOperationModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlOperationMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0020); + COMMAND_HEADER("ReadPumpConfigurationAndControlOperationMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::OperationMode); COMMAND_FOOTER(); } @@ -3368,11 +3630,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterWriteOperationModeAtt EndpointId destinationEndpoint, uint8_t operationMode) { - COMMAND_HEADER("WritePumpConfigurationAndControlOperationMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); + COMMAND_HEADER("WritePumpConfigurationAndControlOperationMode", PumpConfigurationAndControl::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0020) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(PumpConfigurationAndControl::Attributes::Ids::OperationMode) .Put8(48) .Put8(static_cast(operationMode)); COMMAND_FOOTER(); @@ -3384,8 +3646,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterWriteOperationModeAtt PacketBufferHandle encodePumpConfigurationAndControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlClusterRevision", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadPumpConfigurationAndControlClusterRevision", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3403,8 +3668,8 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadClusterRevisionAt PacketBufferHandle encodeRelativeHumidityMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverRelativeHumidityMeasurementAttributes", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverRelativeHumidityMeasurementAttributes", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3414,8 +3679,11 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterDiscoverAttributes(ui PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadRelativeHumidityMeasurementMeasuredValue", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadRelativeHumidityMeasurementMeasuredValue", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(RelativeHumidityMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -3424,12 +3692,12 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterConfigureMeasuredValu uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportRelativeHumidityMeasurementMeasuredValue", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); + COMMAND_HEADER("ReportRelativeHumidityMeasurementMeasuredValue", RelativeHumidityMeasurement::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(RelativeHumidityMeasurement::Attributes::Ids::MeasuredValue) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -3443,8 +3711,11 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterConfigureMeasuredValu PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadRelativeHumidityMeasurementMinMeasuredValue", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadRelativeHumidityMeasurementMinMeasuredValue", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(RelativeHumidityMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -3454,8 +3725,11 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMinMeasuredValueA PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadRelativeHumidityMeasurementMaxMeasuredValue", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadRelativeHumidityMeasurementMaxMeasuredValue", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(RelativeHumidityMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -3465,8 +3739,11 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMaxMeasuredValueA PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadRelativeHumidityMeasurementClusterRevision", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadRelativeHumidityMeasurementClusterRevision", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3493,8 +3770,8 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadClusterRevisionAt PacketBufferHandle encodeScenesClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverScenesAttributes", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverScenesAttributes", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3503,8 +3780,11 @@ PacketBufferHandle encodeScenesClusterDiscoverAttributes(uint8_t seqNum, Endpoin */ PacketBufferHandle encodeScenesClusterReadSceneCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadScenesSceneCount", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadScenesSceneCount", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Scenes::Attributes::Ids::SceneCount); COMMAND_FOOTER(); } @@ -3513,8 +3793,11 @@ PacketBufferHandle encodeScenesClusterReadSceneCountAttribute(uint8_t seqNum, En */ PacketBufferHandle encodeScenesClusterReadCurrentSceneAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadScenesCurrentScene", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadScenesCurrentScene", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Scenes::Attributes::Ids::CurrentScene); COMMAND_FOOTER(); } @@ -3523,8 +3806,11 @@ PacketBufferHandle encodeScenesClusterReadCurrentSceneAttribute(uint8_t seqNum, */ PacketBufferHandle encodeScenesClusterReadCurrentGroupAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadScenesCurrentGroup", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadScenesCurrentGroup", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Scenes::Attributes::Ids::CurrentGroup); COMMAND_FOOTER(); } @@ -3533,8 +3819,11 @@ PacketBufferHandle encodeScenesClusterReadCurrentGroupAttribute(uint8_t seqNum, */ PacketBufferHandle encodeScenesClusterReadSceneValidAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadScenesSceneValid", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadScenesSceneValid", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Scenes::Attributes::Ids::SceneValid); COMMAND_FOOTER(); } @@ -3543,8 +3832,11 @@ PacketBufferHandle encodeScenesClusterReadSceneValidAttribute(uint8_t seqNum, En */ PacketBufferHandle encodeScenesClusterReadNameSupportAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadScenesNameSupport", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0004); + COMMAND_HEADER("ReadScenesNameSupport", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Scenes::Attributes::Ids::NameSupport); COMMAND_FOOTER(); } @@ -3553,8 +3845,11 @@ PacketBufferHandle encodeScenesClusterReadNameSupportAttribute(uint8_t seqNum, E */ PacketBufferHandle encodeScenesClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadScenesClusterRevision", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadScenesClusterRevision", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3571,8 +3866,8 @@ PacketBufferHandle encodeScenesClusterReadClusterRevisionAttribute(uint8_t seqNu PacketBufferHandle encodeSoftwareDiagnosticsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverSoftwareDiagnosticsAttributes", SOFTWARE_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverSoftwareDiagnosticsAttributes", SoftwareDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3582,8 +3877,11 @@ PacketBufferHandle encodeSoftwareDiagnosticsClusterDiscoverAttributes(uint8_t se PacketBufferHandle encodeSoftwareDiagnosticsClusterReadCurrentHeapHighWatermarkAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadSoftwareDiagnosticsCurrentHeapHighWatermark", SOFTWARE_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadSoftwareDiagnosticsCurrentHeapHighWatermark", SoftwareDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(SoftwareDiagnostics::Attributes::Ids::CurrentHeapHighWatermark); COMMAND_FOOTER(); } @@ -3592,8 +3890,11 @@ PacketBufferHandle encodeSoftwareDiagnosticsClusterReadCurrentHeapHighWatermarkA */ PacketBufferHandle encodeSoftwareDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadSoftwareDiagnosticsClusterRevision", SOFTWARE_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadSoftwareDiagnosticsClusterRevision", SoftwareDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3610,8 +3911,8 @@ PacketBufferHandle encodeSoftwareDiagnosticsClusterReadClusterRevisionAttribute( PacketBufferHandle encodeSwitchClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverSwitchAttributes", SWITCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverSwitchAttributes", Switch::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3620,8 +3921,11 @@ PacketBufferHandle encodeSwitchClusterDiscoverAttributes(uint8_t seqNum, Endpoin */ PacketBufferHandle encodeSwitchClusterReadNumberOfPositionsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadSwitchNumberOfPositions", SWITCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadSwitchNumberOfPositions", Switch::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Switch::Attributes::Ids::NumberOfPositions); COMMAND_FOOTER(); } @@ -3630,20 +3934,23 @@ PacketBufferHandle encodeSwitchClusterReadNumberOfPositionsAttribute(uint8_t seq */ PacketBufferHandle encodeSwitchClusterReadCurrentPositionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadSwitchCurrentPosition", SWITCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadSwitchCurrentPosition", Switch::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Switch::Attributes::Ids::CurrentPosition); COMMAND_FOOTER(); } PacketBufferHandle encodeSwitchClusterConfigureCurrentPositionAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval, uint8_t change) { - COMMAND_HEADER("ReportSwitchCurrentPosition", SWITCH_CLUSTER_ID); + COMMAND_HEADER("ReportSwitchCurrentPosition", Switch::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0001) + .Put16(Switch::Attributes::Ids::CurrentPosition) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -3656,8 +3963,11 @@ PacketBufferHandle encodeSwitchClusterConfigureCurrentPositionAttribute(uint8_t */ PacketBufferHandle encodeSwitchClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadSwitchClusterRevision", SWITCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadSwitchClusterRevision", Switch::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3678,8 +3988,8 @@ PacketBufferHandle encodeSwitchClusterReadClusterRevisionAttribute(uint8_t seqNu PacketBufferHandle encodeTvChannelClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverTvChannelAttributes", TV_CHANNEL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTvChannelAttributes", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3688,8 +3998,11 @@ PacketBufferHandle encodeTvChannelClusterDiscoverAttributes(uint8_t seqNum, Endp */ PacketBufferHandle encodeTvChannelClusterReadTvChannelListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTvChannelTvChannelList", TV_CHANNEL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadTvChannelTvChannelList", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TvChannel::Attributes::Ids::TvChannelList); COMMAND_FOOTER(); } @@ -3698,8 +4011,11 @@ PacketBufferHandle encodeTvChannelClusterReadTvChannelListAttribute(uint8_t seqN */ PacketBufferHandle encodeTvChannelClusterReadTvChannelLineupAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTvChannelTvChannelLineup", TV_CHANNEL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadTvChannelTvChannelLineup", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TvChannel::Attributes::Ids::TvChannelLineup); COMMAND_FOOTER(); } @@ -3708,8 +4024,11 @@ PacketBufferHandle encodeTvChannelClusterReadTvChannelLineupAttribute(uint8_t se */ PacketBufferHandle encodeTvChannelClusterReadCurrentTvChannelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTvChannelCurrentTvChannel", TV_CHANNEL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadTvChannelCurrentTvChannel", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TvChannel::Attributes::Ids::CurrentTvChannel); COMMAND_FOOTER(); } @@ -3718,8 +4037,11 @@ PacketBufferHandle encodeTvChannelClusterReadCurrentTvChannelAttribute(uint8_t s */ PacketBufferHandle encodeTvChannelClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTvChannelClusterRevision", TV_CHANNEL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadTvChannelClusterRevision", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3736,8 +4058,8 @@ PacketBufferHandle encodeTvChannelClusterReadClusterRevisionAttribute(uint8_t se PacketBufferHandle encodeTargetNavigatorClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverTargetNavigatorAttributes", TARGET_NAVIGATOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTargetNavigatorAttributes", TargetNavigator::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3746,8 +4068,11 @@ PacketBufferHandle encodeTargetNavigatorClusterDiscoverAttributes(uint8_t seqNum */ PacketBufferHandle encodeTargetNavigatorClusterReadTargetNavigatorListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTargetNavigatorTargetNavigatorList", TARGET_NAVIGATOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadTargetNavigatorTargetNavigatorList", TargetNavigator::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TargetNavigator::Attributes::Ids::TargetNavigatorList); COMMAND_FOOTER(); } @@ -3756,8 +4081,11 @@ PacketBufferHandle encodeTargetNavigatorClusterReadTargetNavigatorListAttribute( */ PacketBufferHandle encodeTargetNavigatorClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTargetNavigatorClusterRevision", TARGET_NAVIGATOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadTargetNavigatorClusterRevision", TargetNavigator::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3775,8 +4103,8 @@ PacketBufferHandle encodeTargetNavigatorClusterReadClusterRevisionAttribute(uint PacketBufferHandle encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3785,8 +4113,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TemperatureMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -3795,12 +4126,12 @@ PacketBufferHandle encodeTemperatureMeasurementClusterConfigureMeasuredValueAttr uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportTemperatureMeasurementMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); + COMMAND_HEADER("ReportTemperatureMeasurementMeasuredValue", TemperatureMeasurement::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(TemperatureMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -3813,8 +4144,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterConfigureMeasuredValueAttr */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TemperatureMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -3823,8 +4157,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadMinMeasuredValueAttrib */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TemperatureMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -3833,8 +4170,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadMaxMeasuredValueAttrib */ PacketBufferHandle encodeTemperatureMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3874,8 +4214,8 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadClusterRevisionAttribu PacketBufferHandle encodeTestClusterClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverTestClusterAttributes", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTestClusterAttributes", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3884,18 +4224,21 @@ PacketBufferHandle encodeTestClusterClusterDiscoverAttributes(uint8_t seqNum, En */ PacketBufferHandle encodeTestClusterClusterReadBooleanAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterBoolean", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadTestClusterBoolean", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Boolean); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteBooleanAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t boolean) { - COMMAND_HEADER("WriteTestClusterBoolean", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterBoolean", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0000) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Boolean) .Put8(16) .Put8(static_cast(boolean)); COMMAND_FOOTER(); @@ -3906,18 +4249,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBooleanAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadBitmap8Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterBitmap8", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadTestClusterBitmap8", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Bitmap8); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteBitmap8Attribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t bitmap8) { - COMMAND_HEADER("WriteTestClusterBitmap8", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterBitmap8", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0001) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Bitmap8) .Put8(24) .Put8(static_cast(bitmap8)); COMMAND_FOOTER(); @@ -3928,18 +4274,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBitmap8Attribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadBitmap16Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterBitmap16", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadTestClusterBitmap16", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Bitmap16); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteBitmap16Attribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t bitmap16) { - COMMAND_HEADER("WriteTestClusterBitmap16", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterBitmap16", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0002) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Bitmap16) .Put8(25) .Put16(static_cast(bitmap16)); COMMAND_FOOTER(); @@ -3950,18 +4299,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBitmap16Attribute(uint8_t seqNum */ PacketBufferHandle encodeTestClusterClusterReadBitmap32Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterBitmap32", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadTestClusterBitmap32", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Bitmap32); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteBitmap32Attribute(uint8_t seqNum, EndpointId destinationEndpoint, uint32_t bitmap32) { - COMMAND_HEADER("WriteTestClusterBitmap32", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterBitmap32", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0003) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Bitmap32) .Put8(27) .Put32(static_cast(bitmap32)); COMMAND_FOOTER(); @@ -3972,18 +4324,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBitmap32Attribute(uint8_t seqNum */ PacketBufferHandle encodeTestClusterClusterReadBitmap64Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterBitmap64", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0004); + COMMAND_HEADER("ReadTestClusterBitmap64", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Bitmap64); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteBitmap64Attribute(uint8_t seqNum, EndpointId destinationEndpoint, uint64_t bitmap64) { - COMMAND_HEADER("WriteTestClusterBitmap64", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterBitmap64", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0004) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Bitmap64) .Put8(31) .Put64(static_cast(bitmap64)); COMMAND_FOOTER(); @@ -3994,18 +4349,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBitmap64Attribute(uint8_t seqNum */ PacketBufferHandle encodeTestClusterClusterReadInt8uAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt8u", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0005); + COMMAND_HEADER("ReadTestClusterInt8u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Int8u); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteInt8uAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t int8u) { - COMMAND_HEADER("WriteTestClusterInt8u", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterInt8u", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0005) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Int8u) .Put8(32) .Put8(static_cast(int8u)); COMMAND_FOOTER(); @@ -4016,18 +4374,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt8uAttribute(uint8_t seqNum, E */ PacketBufferHandle encodeTestClusterClusterReadInt16uAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt16u", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0006); + COMMAND_HEADER("ReadTestClusterInt16u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Int16u); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteInt16uAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t int16u) { - COMMAND_HEADER("WriteTestClusterInt16u", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterInt16u", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0006) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Int16u) .Put8(33) .Put16(static_cast(int16u)); COMMAND_FOOTER(); @@ -4038,18 +4399,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt16uAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt32uAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt32u", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0008); + COMMAND_HEADER("ReadTestClusterInt32u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Int32u); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteInt32uAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint32_t int32u) { - COMMAND_HEADER("WriteTestClusterInt32u", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterInt32u", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0008) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Int32u) .Put8(35) .Put32(static_cast(int32u)); COMMAND_FOOTER(); @@ -4060,18 +4424,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt32uAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt64uAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt64u", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000C); + COMMAND_HEADER("ReadTestClusterInt64u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Int64u); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteInt64uAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint64_t int64u) { - COMMAND_HEADER("WriteTestClusterInt64u", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterInt64u", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x000C) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Int64u) .Put8(39) .Put64(static_cast(int64u)); COMMAND_FOOTER(); @@ -4082,18 +4449,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt64uAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt8sAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt8s", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000D); + COMMAND_HEADER("ReadTestClusterInt8s", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Int8s); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteInt8sAttribute(uint8_t seqNum, EndpointId destinationEndpoint, int8_t int8s) { - COMMAND_HEADER("WriteTestClusterInt8s", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterInt8s", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x000D) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Int8s) .Put8(40) .Put8(static_cast(int8s)); COMMAND_FOOTER(); @@ -4104,18 +4474,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt8sAttribute(uint8_t seqNum, E */ PacketBufferHandle encodeTestClusterClusterReadInt16sAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt16s", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000E); + COMMAND_HEADER("ReadTestClusterInt16s", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Int16s); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteInt16sAttribute(uint8_t seqNum, EndpointId destinationEndpoint, int16_t int16s) { - COMMAND_HEADER("WriteTestClusterInt16s", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterInt16s", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x000E) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Int16s) .Put8(41) .Put16(static_cast(int16s)); COMMAND_FOOTER(); @@ -4126,18 +4499,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt16sAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt32sAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt32s", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0010); + COMMAND_HEADER("ReadTestClusterInt32s", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Int32s); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteInt32sAttribute(uint8_t seqNum, EndpointId destinationEndpoint, int32_t int32s) { - COMMAND_HEADER("WriteTestClusterInt32s", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterInt32s", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0010) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Int32s) .Put8(43) .Put32(static_cast(int32s)); COMMAND_FOOTER(); @@ -4148,18 +4524,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt32sAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt64sAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt64s", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0014); + COMMAND_HEADER("ReadTestClusterInt64s", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Int64s); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteInt64sAttribute(uint8_t seqNum, EndpointId destinationEndpoint, int64_t int64s) { - COMMAND_HEADER("WriteTestClusterInt64s", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterInt64s", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0014) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Int64s) .Put8(47) .Put64(static_cast(int64s)); COMMAND_FOOTER(); @@ -4170,18 +4549,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt64sAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadEnum8Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterEnum8", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0015); + COMMAND_HEADER("ReadTestClusterEnum8", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Enum8); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteEnum8Attribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t enum8) { - COMMAND_HEADER("WriteTestClusterEnum8", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterEnum8", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0015) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Enum8) .Put8(48) .Put8(static_cast(enum8)); COMMAND_FOOTER(); @@ -4192,18 +4574,21 @@ PacketBufferHandle encodeTestClusterClusterWriteEnum8Attribute(uint8_t seqNum, E */ PacketBufferHandle encodeTestClusterClusterReadEnum16Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterEnum16", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0016); + COMMAND_HEADER("ReadTestClusterEnum16", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Enum16); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteEnum16Attribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t enum16) { - COMMAND_HEADER("WriteTestClusterEnum16", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterEnum16", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0016) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Enum16) .Put8(49) .Put16(static_cast(enum16)); COMMAND_FOOTER(); @@ -4214,15 +4599,18 @@ PacketBufferHandle encodeTestClusterClusterWriteEnum16Attribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterOctetString", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0019); + COMMAND_HEADER("ReadTestClusterOctetString", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::OctetString); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint, chip::ByteSpan octetString) { - COMMAND_HEADER("WriteTestClusterOctetString", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterOctetString", TestCluster::Id); size_t octetStringStrLen = octetString.size(); if (!CanCastTo(octetStringStrLen)) { @@ -4232,8 +4620,8 @@ PacketBufferHandle encodeTestClusterClusterWriteOctetStringAttribute(uint8_t seq buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0019) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::OctetString) .Put8(65) .Put(static_cast(octetStringStrLen)) .Put(octetString.data(), octetStringStrLen); @@ -4245,8 +4633,11 @@ PacketBufferHandle encodeTestClusterClusterWriteOctetStringAttribute(uint8_t seq */ PacketBufferHandle encodeTestClusterClusterReadListInt8uAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterListInt8u", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001A); + COMMAND_HEADER("ReadTestClusterListInt8u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::ListInt8u); COMMAND_FOOTER(); } @@ -4255,8 +4646,11 @@ PacketBufferHandle encodeTestClusterClusterReadListInt8uAttribute(uint8_t seqNum */ PacketBufferHandle encodeTestClusterClusterReadListOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterListOctetString", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001B); + COMMAND_HEADER("ReadTestClusterListOctetString", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::ListOctetString); COMMAND_FOOTER(); } @@ -4265,8 +4659,11 @@ PacketBufferHandle encodeTestClusterClusterReadListOctetStringAttribute(uint8_t */ PacketBufferHandle encodeTestClusterClusterReadListStructOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterListStructOctetString", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001C); + COMMAND_HEADER("ReadTestClusterListStructOctetString", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::ListStructOctetString); COMMAND_FOOTER(); } @@ -4275,15 +4672,18 @@ PacketBufferHandle encodeTestClusterClusterReadListStructOctetStringAttribute(ui */ PacketBufferHandle encodeTestClusterClusterReadLongOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterLongOctetString", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001D); + COMMAND_HEADER("ReadTestClusterLongOctetString", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::LongOctetString); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteLongOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint, chip::ByteSpan longOctetString) { - COMMAND_HEADER("WriteTestClusterLongOctetString", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterLongOctetString", TestCluster::Id); size_t longOctetStringStrLen = longOctetString.size(); if (!CanCastTo(longOctetStringStrLen)) { @@ -4293,8 +4693,8 @@ PacketBufferHandle encodeTestClusterClusterWriteLongOctetStringAttribute(uint8_t buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x001D) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::LongOctetString) .Put8(67) .Put16(static_cast(longOctetStringStrLen)) .Put(longOctetString.data(), longOctetStringStrLen); @@ -4306,19 +4706,22 @@ PacketBufferHandle encodeTestClusterClusterWriteLongOctetStringAttribute(uint8_t */ PacketBufferHandle encodeTestClusterClusterReadUnsupportedAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterUnsupported", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x00FF); + COMMAND_HEADER("ReadTestClusterUnsupported", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(TestCluster::Attributes::Ids::Unsupported); COMMAND_FOOTER(); } PacketBufferHandle encodeTestClusterClusterWriteUnsupportedAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t unsupported) { - COMMAND_HEADER("WriteTestClusterUnsupported", TEST_CLUSTER_ID); + COMMAND_HEADER("WriteTestClusterUnsupported", TestCluster::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x00FF) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(TestCluster::Attributes::Ids::Unsupported) .Put8(16) .Put8(static_cast(unsupported)); COMMAND_FOOTER(); @@ -4329,8 +4732,11 @@ PacketBufferHandle encodeTestClusterClusterWriteUnsupportedAttribute(uint8_t seq */ PacketBufferHandle encodeTestClusterClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterClusterRevision", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadTestClusterClusterRevision", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -4355,8 +4761,8 @@ PacketBufferHandle encodeTestClusterClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeThermostatClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverThermostatAttributes", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverThermostatAttributes", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -4365,8 +4771,11 @@ PacketBufferHandle encodeThermostatClusterDiscoverAttributes(uint8_t seqNum, End */ PacketBufferHandle encodeThermostatClusterReadLocalTemperatureAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatLocalTemperature", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadThermostatLocalTemperature", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Thermostat::Attributes::Ids::LocalTemperature); COMMAND_FOOTER(); } @@ -4374,12 +4783,12 @@ PacketBufferHandle encodeThermostatClusterConfigureLocalTemperatureAttribute(uin uint16_t minInterval, uint16_t maxInterval, int16_t change) { - COMMAND_HEADER("ReportThermostatLocalTemperature", THERMOSTAT_CLUSTER_ID); + COMMAND_HEADER("ReportThermostatLocalTemperature", Thermostat::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(Thermostat::Attributes::Ids::LocalTemperature) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -4392,19 +4801,22 @@ PacketBufferHandle encodeThermostatClusterConfigureLocalTemperatureAttribute(uin */ PacketBufferHandle encodeThermostatClusterReadOccupiedCoolingSetpointAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatOccupiedCoolingSetpoint", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_HEADER("ReadThermostatOccupiedCoolingSetpoint", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Thermostat::Attributes::Ids::OccupiedCoolingSetpoint); COMMAND_FOOTER(); } PacketBufferHandle encodeThermostatClusterWriteOccupiedCoolingSetpointAttribute(uint8_t seqNum, EndpointId destinationEndpoint, int16_t occupiedCoolingSetpoint) { - COMMAND_HEADER("WriteThermostatOccupiedCoolingSetpoint", THERMOSTAT_CLUSTER_ID); + COMMAND_HEADER("WriteThermostatOccupiedCoolingSetpoint", Thermostat::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0011) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(Thermostat::Attributes::Ids::OccupiedCoolingSetpoint) .Put8(41) .Put16(static_cast(occupiedCoolingSetpoint)); COMMAND_FOOTER(); @@ -4415,19 +4827,22 @@ PacketBufferHandle encodeThermostatClusterWriteOccupiedCoolingSetpointAttribute( */ PacketBufferHandle encodeThermostatClusterReadOccupiedHeatingSetpointAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatOccupiedHeatingSetpoint", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0012); + COMMAND_HEADER("ReadThermostatOccupiedHeatingSetpoint", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Thermostat::Attributes::Ids::OccupiedHeatingSetpoint); COMMAND_FOOTER(); } PacketBufferHandle encodeThermostatClusterWriteOccupiedHeatingSetpointAttribute(uint8_t seqNum, EndpointId destinationEndpoint, int16_t occupiedHeatingSetpoint) { - COMMAND_HEADER("WriteThermostatOccupiedHeatingSetpoint", THERMOSTAT_CLUSTER_ID); + COMMAND_HEADER("WriteThermostatOccupiedHeatingSetpoint", Thermostat::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0012) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(Thermostat::Attributes::Ids::OccupiedHeatingSetpoint) .Put8(41) .Put16(static_cast(occupiedHeatingSetpoint)); COMMAND_FOOTER(); @@ -4438,19 +4853,22 @@ PacketBufferHandle encodeThermostatClusterWriteOccupiedHeatingSetpointAttribute( */ PacketBufferHandle encodeThermostatClusterReadControlSequenceOfOperationAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatControlSequenceOfOperation", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001B); + COMMAND_HEADER("ReadThermostatControlSequenceOfOperation", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Thermostat::Attributes::Ids::ControlSequenceOfOperation); COMMAND_FOOTER(); } PacketBufferHandle encodeThermostatClusterWriteControlSequenceOfOperationAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t controlSequenceOfOperation) { - COMMAND_HEADER("WriteThermostatControlSequenceOfOperation", THERMOSTAT_CLUSTER_ID); + COMMAND_HEADER("WriteThermostatControlSequenceOfOperation", Thermostat::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x001B) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(Thermostat::Attributes::Ids::ControlSequenceOfOperation) .Put8(48) .Put8(static_cast(controlSequenceOfOperation)); COMMAND_FOOTER(); @@ -4461,19 +4879,22 @@ PacketBufferHandle encodeThermostatClusterWriteControlSequenceOfOperationAttribu */ PacketBufferHandle encodeThermostatClusterReadSystemModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatSystemMode", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001C); + COMMAND_HEADER("ReadThermostatSystemMode", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Thermostat::Attributes::Ids::SystemMode); COMMAND_FOOTER(); } PacketBufferHandle encodeThermostatClusterWriteSystemModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t systemMode) { - COMMAND_HEADER("WriteThermostatSystemMode", THERMOSTAT_CLUSTER_ID); + COMMAND_HEADER("WriteThermostatSystemMode", Thermostat::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x001C) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(Thermostat::Attributes::Ids::SystemMode) .Put8(48) .Put8(static_cast(systemMode)); COMMAND_FOOTER(); @@ -4484,8 +4905,11 @@ PacketBufferHandle encodeThermostatClusterWriteSystemModeAttribute(uint8_t seqNu */ PacketBufferHandle encodeThermostatClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatClusterRevision", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadThermostatClusterRevision", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -4561,8 +4985,8 @@ PacketBufferHandle encodeThermostatClusterReadClusterRevisionAttribute(uint8_t s PacketBufferHandle encodeThreadNetworkDiagnosticsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverThreadNetworkDiagnosticsAttributes", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverThreadNetworkDiagnosticsAttributes", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -4571,8 +4995,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterDiscoverAttributes(uint8 */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChannelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsChannel", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsChannel", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::Channel); COMMAND_FOOTER(); } @@ -4581,8 +5008,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChannelAttribute(uin */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRoutingRoleAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRoutingRole", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0001); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRoutingRole", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RoutingRole); COMMAND_FOOTER(); } @@ -4591,8 +5021,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRoutingRoleAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadNetworkNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsNetworkName", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0002); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsNetworkName", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::NetworkName); COMMAND_FOOTER(); } @@ -4601,8 +5034,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadNetworkNameAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPanIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsPanId", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsPanId", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::PanId); COMMAND_FOOTER(); } @@ -4611,8 +5047,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPanIdAttribute(uint8 */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadExtendedPanIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsExtendedPanId", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0004); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsExtendedPanId", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::ExtendedPanId); COMMAND_FOOTER(); } @@ -4621,8 +5060,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadExtendedPanIdAttribu */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadMeshLocalPrefixAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsMeshLocalPrefix", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0005); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsMeshLocalPrefix", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::MeshLocalPrefix); COMMAND_FOOTER(); } @@ -4631,8 +5073,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadMeshLocalPrefixAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadOverrunCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsOverrunCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0006); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsOverrunCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::OverrunCount); COMMAND_FOOTER(); } @@ -4642,8 +5087,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadOverrunCountAttribut PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadNeighborTableListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsNeighborTableList", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0007); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsNeighborTableList", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::NeighborTableList); COMMAND_FOOTER(); } @@ -4652,8 +5100,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadNeighborTableListAtt */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRouteTableListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRouteTableList", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0008); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRouteTableList", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RouteTableList); COMMAND_FOOTER(); } @@ -4662,8 +5113,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRouteTableListAttrib */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPartitionIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsPartitionId", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0009); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsPartitionId", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::PartitionId); COMMAND_FOOTER(); } @@ -4672,8 +5126,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPartitionIdAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadWeightingAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsWeighting", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000A); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsWeighting", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::Weighting); COMMAND_FOOTER(); } @@ -4682,8 +5139,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadWeightingAttribute(u */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadDataVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsDataVersion", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000B); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsDataVersion", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::DataVersion); COMMAND_FOOTER(); } @@ -4693,8 +5153,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadDataVersionAttribute PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadStableDataVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsStableDataVersion", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000C); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsStableDataVersion", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::StableDataVersion); COMMAND_FOOTER(); } @@ -4703,8 +5166,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadStableDataVersionAtt */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadLeaderRouterIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsLeaderRouterId", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000D); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsLeaderRouterId", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::LeaderRouterId); COMMAND_FOOTER(); } @@ -4714,8 +5180,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadLeaderRouterIdAttrib PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadDetachedRoleCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsDetachedRoleCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000E); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsDetachedRoleCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::DetachedRoleCount); COMMAND_FOOTER(); } @@ -4724,8 +5193,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadDetachedRoleCountAtt */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChildRoleCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsChildRoleCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x000F); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsChildRoleCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::ChildRoleCount); COMMAND_FOOTER(); } @@ -4734,8 +5206,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChildRoleCountAttrib */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRouterRoleCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRouterRoleCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0010); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRouterRoleCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RouterRoleCount); COMMAND_FOOTER(); } @@ -4744,8 +5219,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRouterRoleCountAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadLeaderRoleCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsLeaderRoleCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsLeaderRoleCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::LeaderRoleCount); COMMAND_FOOTER(); } @@ -4755,8 +5233,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadLeaderRoleCountAttri PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadAttachAttemptCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsAttachAttemptCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0012); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsAttachAttemptCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::AttachAttemptCount); COMMAND_FOOTER(); } @@ -4766,8 +5247,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadAttachAttemptCountAt PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPartitionIdChangeCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsPartitionIdChangeCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0013); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsPartitionIdChangeCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::PartitionIdChangeCount); COMMAND_FOOTER(); } @@ -4777,8 +5261,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPartitionIdChangeCou PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadBetterPartitionAttachAttemptCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0014); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::BetterPartitionAttachAttemptCount); COMMAND_FOOTER(); } @@ -4788,8 +5275,11 @@ encodeThreadNetworkDiagnosticsClusterReadBetterPartitionAttachAttemptCountAttrib PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadParentChangeCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsParentChangeCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0015); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsParentChangeCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::ParentChangeCount); COMMAND_FOOTER(); } @@ -4798,8 +5288,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadParentChangeCountAtt */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxTotalCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxTotalCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0016); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxTotalCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxTotalCount); COMMAND_FOOTER(); } @@ -4808,8 +5301,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxTotalCountAttribut */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxUnicastCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxUnicastCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0017); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxUnicastCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxUnicastCount); COMMAND_FOOTER(); } @@ -4819,8 +5315,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxUnicastCountAttrib PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBroadcastCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBroadcastCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0018); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBroadcastCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxBroadcastCount); COMMAND_FOOTER(); } @@ -4830,8 +5329,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBroadcastCountAttr PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxAckRequestedCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxAckRequestedCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0019); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxAckRequestedCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxAckRequestedCount); COMMAND_FOOTER(); } @@ -4840,8 +5342,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxAckRequestedCountA */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxAckedCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxAckedCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001A); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxAckedCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxAckedCount); COMMAND_FOOTER(); } @@ -4851,8 +5356,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxAckedCountAttribut PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxNoAckRequestedCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxNoAckRequestedCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001B); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxNoAckRequestedCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxNoAckRequestedCount); COMMAND_FOOTER(); } @@ -4861,8 +5369,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxNoAckRequestedCoun */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDataCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDataCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001C); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDataCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxDataCount); COMMAND_FOOTER(); } @@ -4871,8 +5382,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDataCountAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDataPollCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDataPollCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001D); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDataPollCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxDataPollCount); COMMAND_FOOTER(); } @@ -4881,8 +5395,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDataPollCountAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBeaconCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBeaconCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001E); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBeaconCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxBeaconCount); COMMAND_FOOTER(); } @@ -4892,8 +5409,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBeaconCountAttribu PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBeaconRequestCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBeaconRequestCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x001F); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBeaconRequestCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxBeaconRequestCount); COMMAND_FOOTER(); } @@ -4902,8 +5422,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBeaconRequestCount */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxOtherCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxOtherCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0020); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxOtherCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxOtherCount); COMMAND_FOOTER(); } @@ -4912,8 +5435,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxOtherCountAttribut */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxRetryCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxRetryCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0021); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxRetryCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxRetryCount); COMMAND_FOOTER(); } @@ -4923,8 +5449,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxRetryCountAttribut PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDirectMaxRetryExpiryCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0022); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxDirectMaxRetryExpiryCount); COMMAND_FOOTER(); } @@ -4934,8 +5463,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDirectMaxRetryExpi PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxIndirectMaxRetryExpiryCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0023); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxIndirectMaxRetryExpiryCount); COMMAND_FOOTER(); } @@ -4944,8 +5476,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxIndirectMaxRetryEx */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrCcaCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrCcaCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0024); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrCcaCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxErrCcaCount); COMMAND_FOOTER(); } @@ -4954,8 +5489,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrCcaCountAttribu */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrAbortCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrAbortCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0025); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrAbortCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxErrAbortCount); COMMAND_FOOTER(); } @@ -4965,8 +5503,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrAbortCountAttri PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrBusyChannelCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrBusyChannelCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0026); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrBusyChannelCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::TxErrBusyChannelCount); COMMAND_FOOTER(); } @@ -4975,8 +5516,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrBusyChannelCoun */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxTotalCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxTotalCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0027); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxTotalCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxTotalCount); COMMAND_FOOTER(); } @@ -4985,8 +5529,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxTotalCountAttribut */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxUnicastCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxUnicastCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0028); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxUnicastCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxUnicastCount); COMMAND_FOOTER(); } @@ -4996,8 +5543,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxUnicastCountAttrib PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBroadcastCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBroadcastCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0029); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBroadcastCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxBroadcastCount); COMMAND_FOOTER(); } @@ -5006,8 +5556,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBroadcastCountAttr */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDataCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDataCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x002A); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDataCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxDataCount); COMMAND_FOOTER(); } @@ -5016,8 +5569,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDataCountAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDataPollCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDataPollCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x002B); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDataPollCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxDataPollCount); COMMAND_FOOTER(); } @@ -5026,8 +5582,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDataPollCountAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBeaconCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBeaconCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x002C); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBeaconCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxBeaconCount); COMMAND_FOOTER(); } @@ -5037,8 +5596,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBeaconCountAttribu PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBeaconRequestCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBeaconRequestCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x002D); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBeaconRequestCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxBeaconRequestCount); COMMAND_FOOTER(); } @@ -5047,8 +5609,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBeaconRequestCount */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxOtherCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxOtherCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x002E); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxOtherCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxOtherCount); COMMAND_FOOTER(); } @@ -5058,8 +5623,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxOtherCountAttribut PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxAddressFilteredCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxAddressFilteredCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x002F); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxAddressFilteredCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxAddressFilteredCount); COMMAND_FOOTER(); } @@ -5069,8 +5637,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxAddressFilteredCou PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDestAddrFilteredCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0030); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxDestAddrFilteredCount); COMMAND_FOOTER(); } @@ -5080,8 +5651,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDestAddrFilteredCo PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDuplicatedCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDuplicatedCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0031); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDuplicatedCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxDuplicatedCount); COMMAND_FOOTER(); } @@ -5091,8 +5665,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDuplicatedCountAtt PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrNoFrameCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrNoFrameCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0032); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrNoFrameCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxErrNoFrameCount); COMMAND_FOOTER(); } @@ -5102,8 +5679,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrNoFrameCountAtt PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrUnknownNeighborCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0033); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxErrUnknownNeighborCount); COMMAND_FOOTER(); } @@ -5113,8 +5693,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrUnknownNeighbor PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrInvalidSrcAddrCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0034); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxErrInvalidSrcAddrCount); COMMAND_FOOTER(); } @@ -5123,8 +5706,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrInvalidSrcAddrC */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrSecCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrSecCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0035); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrSecCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxErrSecCount); COMMAND_FOOTER(); } @@ -5133,8 +5719,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrSecCountAttribu */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrFcsCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrFcsCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0036); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrFcsCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxErrFcsCount); COMMAND_FOOTER(); } @@ -5143,8 +5732,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrFcsCountAttribu */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrOtherCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrOtherCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0037); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrOtherCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::RxErrOtherCount); COMMAND_FOOTER(); } @@ -5153,8 +5745,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrOtherCountAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadSecurityPolicyAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsSecurityPolicy", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x003B); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsSecurityPolicy", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::SecurityPolicy); COMMAND_FOOTER(); } @@ -5163,8 +5758,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadSecurityPolicyAttrib */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChannelMaskAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsChannelMask", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x003C); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsChannelMask", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::ChannelMask); COMMAND_FOOTER(); } @@ -5174,8 +5772,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChannelMaskAttribute PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadOperationalDatasetComponentsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsOperationalDatasetComponents", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x003D); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsOperationalDatasetComponents", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::OperationalDatasetComponents); COMMAND_FOOTER(); } @@ -5185,8 +5786,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadOperationalDatasetCo PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadActiveNetworkFaultsListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsActiveNetworkFaultsList", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x003E); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsActiveNetworkFaultsList", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(ThreadNetworkDiagnostics::Attributes::Ids::ActiveNetworkFaultsList); COMMAND_FOOTER(); } @@ -5195,8 +5799,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadActiveNetworkFaultsL */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsClusterRevision", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsClusterRevision", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -5212,8 +5819,8 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadClusterRevisionAttri PacketBufferHandle encodeWakeOnLanClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverWakeOnLanAttributes", WAKE_ON_LAN_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverWakeOnLanAttributes", WakeOnLan::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -5222,8 +5829,11 @@ PacketBufferHandle encodeWakeOnLanClusterDiscoverAttributes(uint8_t seqNum, Endp */ PacketBufferHandle encodeWakeOnLanClusterReadWakeOnLanMacAddressAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWakeOnLanWakeOnLanMacAddress", WAKE_ON_LAN_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadWakeOnLanWakeOnLanMacAddress", WakeOnLan::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WakeOnLan::Attributes::Ids::WakeOnLanMacAddress); COMMAND_FOOTER(); } @@ -5232,8 +5842,11 @@ PacketBufferHandle encodeWakeOnLanClusterReadWakeOnLanMacAddressAttribute(uint8_ */ PacketBufferHandle encodeWakeOnLanClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWakeOnLanClusterRevision", WAKE_ON_LAN_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadWakeOnLanClusterRevision", WakeOnLan::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -5264,8 +5877,8 @@ PacketBufferHandle encodeWakeOnLanClusterReadClusterRevisionAttribute(uint8_t se PacketBufferHandle encodeWindowCoveringClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverWindowCoveringAttributes", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverWindowCoveringAttributes", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(Globals::Ids::Commands::DiscoverAttributes).Put16(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -5274,20 +5887,23 @@ PacketBufferHandle encodeWindowCoveringClusterDiscoverAttributes(uint8_t seqNum, */ PacketBufferHandle encodeWindowCoveringClusterReadTypeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringType", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_HEADER("ReadWindowCoveringType", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WindowCovering::Attributes::Ids::Type); COMMAND_FOOTER(); } PacketBufferHandle encodeWindowCoveringClusterConfigureTypeAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval) { - COMMAND_HEADER("ReportWindowCoveringType", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringType", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0000) + .Put16(WindowCovering::Attributes::Ids::Type) .Put8(48) .Put16(minInterval) .Put16(maxInterval); @@ -5299,8 +5915,11 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureTypeAttribute(uint8_t seq */ PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringCurrentPositionLift", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_HEADER("ReadWindowCoveringCurrentPositionLift", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WindowCovering::Attributes::Ids::CurrentPositionLift); COMMAND_FOOTER(); } @@ -5308,12 +5927,12 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionLiftAttrib uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportWindowCoveringCurrentPositionLift", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringCurrentPositionLift", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0003) + .Put16(WindowCovering::Attributes::Ids::CurrentPositionLift) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -5326,8 +5945,11 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionLiftAttrib */ PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringCurrentPositionTilt", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0004); + COMMAND_HEADER("ReadWindowCoveringCurrentPositionTilt", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WindowCovering::Attributes::Ids::CurrentPositionTilt); COMMAND_FOOTER(); } @@ -5335,12 +5957,12 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionTiltAttrib uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportWindowCoveringCurrentPositionTilt", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringCurrentPositionTilt", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0004) + .Put16(WindowCovering::Attributes::Ids::CurrentPositionTilt) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -5353,20 +5975,23 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionTiltAttrib */ PacketBufferHandle encodeWindowCoveringClusterReadConfigStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringConfigStatus", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0007); + COMMAND_HEADER("ReadWindowCoveringConfigStatus", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WindowCovering::Attributes::Ids::ConfigStatus); COMMAND_FOOTER(); } PacketBufferHandle encodeWindowCoveringClusterConfigureConfigStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval) { - COMMAND_HEADER("ReportWindowCoveringConfigStatus", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringConfigStatus", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(Globals::Ids::Commands::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put16(0x0007) + .Put16(WindowCovering::Attributes::Ids::ConfigStatus) .Put8(24) .Put16(minInterval) .Put16(maxInterval); @@ -5378,8 +6003,11 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureConfigStatusAttribute(uin */ PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitLift", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0010); + COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitLift", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WindowCovering::Attributes::Ids::InstalledOpenLimitLift); COMMAND_FOOTER(); } @@ -5388,8 +6016,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitLiftAttribut */ PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitLift", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitLift", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WindowCovering::Attributes::Ids::InstalledClosedLimitLift); COMMAND_FOOTER(); } @@ -5398,8 +6029,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitLiftAttrib */ PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitTilt", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0012); + COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitTilt", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WindowCovering::Attributes::Ids::InstalledOpenLimitTilt); COMMAND_FOOTER(); } @@ -5408,8 +6042,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitTiltAttribut */ PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitTilt", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0013); + COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitTilt", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WindowCovering::Attributes::Ids::InstalledClosedLimitTilt); COMMAND_FOOTER(); } @@ -5418,18 +6055,21 @@ PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitTiltAttrib */ PacketBufferHandle encodeWindowCoveringClusterReadModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringMode", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0017); + COMMAND_HEADER("ReadWindowCoveringMode", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(WindowCovering::Attributes::Ids::Mode); COMMAND_FOOTER(); } PacketBufferHandle encodeWindowCoveringClusterWriteModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t mode) { - COMMAND_HEADER("WriteWindowCoveringMode", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("WriteWindowCoveringMode", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put16(0x0017) + .Put8(Globals::Ids::Commands::WriteAttributes) + .Put16(WindowCovering::Attributes::Ids::Mode) .Put8(24) .Put8(static_cast(mode)); COMMAND_FOOTER(); @@ -5440,7 +6080,10 @@ PacketBufferHandle encodeWindowCoveringClusterWriteModeAttribute(uint8_t seqNum, */ PacketBufferHandle encodeWindowCoveringClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringClusterRevision", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_HEADER("ReadWindowCoveringClusterRevision", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(Globals::Ids::Commands::ReadAttributes) + .Put16(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); }