diff --git a/examples/pump-app/pump-common/gen/encoder.cpp b/examples/pump-app/pump-common/gen/encoder.cpp index ffad8712795a9c..44fe94d51656ed 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::Clusters; 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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverFlowMeasurementAttributes", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadFlowMeasurementMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadFlowMeasurementMinMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadFlowMeasurementMaxMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadFlowMeasurementClusterRevision", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadPressureMeasurementMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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 0e782474f25719..be6ed47551a45e 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::Clusters; 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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverFlowMeasurementAttributes", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadFlowMeasurementMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadFlowMeasurementMinMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadFlowMeasurementMaxMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadFlowMeasurementClusterRevision", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverLevelControlAttributes", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadLevelControlCurrentLevel", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadLevelControlClusterRevision", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverOnOffAttributes", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadOnOffOnOff", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadOnOffClusterRevision", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadPressureMeasurementMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPumpConfigurationAndControlAttributes", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxPressure", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxSpeed", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxFlow", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0011); + COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveOperationMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0012); + COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveControlMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0013); + COMMAND_HEADER("ReadPumpConfigurationAndControlCapacity", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0013) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0020); + COMMAND_HEADER("ReadPumpConfigurationAndControlOperationMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0020) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadPumpConfigurationAndControlClusterRevision", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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..af543b5843d8e7 --- /dev/null +++ b/src/app/common/gen/ids/Attributes.h @@ -0,0 +1,1571 @@ +/* + * + * 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 Clusters { + +namespace Globals { +namespace Attributes { +namespace Ids { +static constexpr AttributeId FeatureMap = 0xFFFC; +static constexpr AttributeId ClusterRevision = 0xFFFD; +} // namespace Ids +} // namespace Attributes +} // namespace Globals + +namespace PowerConfiguration { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MainsVoltage = 0x0000; +static constexpr AttributeId MainsFrequency = 0x0001; +static constexpr AttributeId MainsAlarmMask = 0x0010; +static constexpr AttributeId MainsVoltageMinThreshold = 0x0011; +static constexpr AttributeId MainsVoltageMaxThreshold = 0x0012; +static constexpr AttributeId MainsVoltageDwellTrip = 0x0013; +static constexpr AttributeId BatteryVoltage = 0x0020; +static constexpr AttributeId BatteryPercentageRemaining = 0x0021; +static constexpr AttributeId BatteryManufacturer = 0x0030; +static constexpr AttributeId BatterySize = 0x0031; +static constexpr AttributeId BatteryAhrRating = 0x0032; +static constexpr AttributeId BatteryQuantity = 0x0033; +static constexpr AttributeId BatteryRatedVoltage = 0x0034; +static constexpr AttributeId BatteryAlarmMask = 0x0035; +static constexpr AttributeId BatteryVoltageMinThreshold = 0x0036; +static constexpr AttributeId BatteryVoltageThreshold1 = 0x0037; +static constexpr AttributeId BatteryVoltageThreshold2 = 0x0038; +static constexpr AttributeId BatteryVoltageThreshold3 = 0x0039; +static constexpr AttributeId BatteryPercentageMinThreshold = 0x003A; +static constexpr AttributeId BatteryPercentageThreshold1 = 0x003B; +static constexpr AttributeId BatteryPercentageThreshold2 = 0x003C; +static constexpr AttributeId BatteryPercentageThreshold3 = 0x003D; +static constexpr AttributeId BatteryAlarmState = 0x003E; +static constexpr AttributeId Battery2Voltage = 0x0040; +static constexpr AttributeId Battery2PercentageRemaining = 0x0041; +static constexpr AttributeId Battery2Manufacturer = 0x0050; +static constexpr AttributeId Battery2Size = 0x0051; +static constexpr AttributeId Battery2AhrRating = 0x0052; +static constexpr AttributeId Battery2Quantity = 0x0053; +static constexpr AttributeId Battery2RatedVoltage = 0x0054; +static constexpr AttributeId Battery2AlarmMask = 0x0055; +static constexpr AttributeId Battery2VoltageMinThreshold = 0x0056; +static constexpr AttributeId Battery2VoltageThreshold1 = 0x0057; +static constexpr AttributeId Battery2VoltageThreshold2 = 0x0058; +static constexpr AttributeId Battery2VoltageThreshold3 = 0x0059; +static constexpr AttributeId Battery2PercentageMinThreshold = 0x005A; +static constexpr AttributeId Battery2PercentageThreshold1 = 0x005B; +static constexpr AttributeId Battery2PercentageThreshold2 = 0x005C; +static constexpr AttributeId Battery2PercentageThreshold3 = 0x005D; +static constexpr AttributeId Battery2AlarmState = 0x005E; +static constexpr AttributeId Battery3Voltage = 0x0060; +static constexpr AttributeId Battery3PercentageRemaining = 0x0061; +static constexpr AttributeId Battery3Manufacturer = 0x0070; +static constexpr AttributeId Battery3Size = 0x0071; +static constexpr AttributeId Battery3AhrRating = 0x0072; +static constexpr AttributeId Battery3Quantity = 0x0073; +static constexpr AttributeId Battery3RatedVoltage = 0x0074; +static constexpr AttributeId Battery3AlarmMask = 0x0075; +static constexpr AttributeId Battery3VoltageMinThreshold = 0x0076; +static constexpr AttributeId Battery3VoltageThreshold1 = 0x0077; +static constexpr AttributeId Battery3VoltageThreshold2 = 0x0078; +static constexpr AttributeId Battery3VoltageThreshold3 = 0x0079; +static constexpr AttributeId Battery3PercentageMinThreshold = 0x007A; +static constexpr AttributeId Battery3PercentageThreshold1 = 0x007B; +static constexpr AttributeId Battery3PercentageThreshold2 = 0x007C; +static constexpr AttributeId Battery3PercentageThreshold3 = 0x007D; +static constexpr AttributeId Battery3AlarmState = 0x007E; +} // namespace Ids +} // namespace Attributes +} // namespace PowerConfiguration + +namespace DeviceTemperatureConfiguration { +namespace Attributes { +namespace Ids { +static constexpr AttributeId CurrentTemperature = 0x0000; +static constexpr AttributeId MinTempExperienced = 0x0001; +static constexpr AttributeId MaxTempExperienced = 0x0002; +static constexpr AttributeId OverTempTotalDwell = 0x0003; +static constexpr AttributeId DeviceTempAlarmMask = 0x0010; +static constexpr AttributeId LowTempThreshold = 0x0011; +static constexpr AttributeId HighTempThreshold = 0x0012; +static constexpr AttributeId LowTempDwellTripPoint = 0x0013; +static constexpr AttributeId HighTempDwellTripPoint = 0x0014; +} // namespace Ids +} // namespace Attributes +} // namespace DeviceTemperatureConfiguration + +namespace Identify { +namespace Attributes { +namespace Ids { +static constexpr AttributeId IdentifyTime = 0x0000; +static constexpr AttributeId CommissionState = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace Identify + +namespace Groups { +namespace Attributes { +namespace Ids { +static constexpr AttributeId NameSupport = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace Groups + +namespace Scenes { +namespace Attributes { +namespace Ids { +static constexpr AttributeId SceneCount = 0x0000; +static constexpr AttributeId CurrentScene = 0x0001; +static constexpr AttributeId CurrentGroup = 0x0002; +static constexpr AttributeId SceneValid = 0x0003; +static constexpr AttributeId NameSupport = 0x0004; +static constexpr AttributeId LastConfiguredBy = 0x0005; +} // namespace Ids +} // namespace Attributes +} // namespace Scenes + +namespace OnOff { +namespace Attributes { +namespace Ids { +static constexpr AttributeId OnOff = 0x0000; +static constexpr AttributeId SampleMfgSpecificAttribute0x00000x1002 = 0x0000; +static constexpr AttributeId SampleMfgSpecificAttribute0x00000x1049 = 0x0000; +static constexpr AttributeId SampleMfgSpecificAttribute0x00010x1002 = 0x0001; +static constexpr AttributeId SampleMfgSpecificAttribute0x00010x1040 = 0x0001; +static constexpr AttributeId GlobalSceneControl = 0x4000; +static constexpr AttributeId OnTime = 0x4001; +static constexpr AttributeId OffWaitTime = 0x4002; +static constexpr AttributeId StartUpOnOff = 0x4003; +} // namespace Ids +} // namespace Attributes +} // namespace OnOff + +namespace OnOffSwitchConfiguration { +namespace Attributes { +namespace Ids { +static constexpr AttributeId SwitchType = 0x0000; +static constexpr AttributeId SwitchActions = 0x0010; +} // namespace Ids +} // namespace Attributes +} // namespace OnOffSwitchConfiguration + +namespace LevelControl { +namespace Attributes { +namespace Ids { +static constexpr AttributeId CurrentLevel = 0x0000; +static constexpr AttributeId RemainingTime = 0x0001; +static constexpr AttributeId Options = 0x000F; +static constexpr AttributeId OnOffTransitionTime = 0x0010; +static constexpr AttributeId OnLevel = 0x0011; +static constexpr AttributeId OnTransitionTime = 0x0012; +static constexpr AttributeId OffTransitionTime = 0x0013; +static constexpr AttributeId DefaultMoveRate = 0x0014; +static constexpr AttributeId StartUpCurrentLevel = 0x4000; +} // namespace Ids +} // namespace Attributes +} // namespace LevelControl + +namespace Alarms { +namespace Attributes { +namespace Ids { +static constexpr AttributeId AlarmCount = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace Alarms + +namespace Time { +namespace Attributes { +namespace Ids { +static constexpr AttributeId Time = 0x0000; +static constexpr AttributeId TimeStatus = 0x0001; +static constexpr AttributeId TimeZone = 0x0002; +static constexpr AttributeId DstStart = 0x0003; +static constexpr AttributeId DstEnd = 0x0004; +static constexpr AttributeId DstShift = 0x0005; +static constexpr AttributeId StandardTime = 0x0006; +static constexpr AttributeId LocalTime = 0x0007; +static constexpr AttributeId LastSetTime = 0x0008; +static constexpr AttributeId ValidUntilTime = 0x0009; +} // namespace Ids +} // namespace Attributes +} // namespace Time + +namespace BinaryInputBasic { +namespace Attributes { +namespace Ids { +static constexpr AttributeId ActiveText = 0x0004; +static constexpr AttributeId Description = 0x001C; +static constexpr AttributeId InactiveText = 0x002E; +static constexpr AttributeId OutOfService = 0x0051; +static constexpr AttributeId Polarity = 0x0054; +static constexpr AttributeId PresentValue = 0x0055; +static constexpr AttributeId Reliability = 0x0067; +static constexpr AttributeId StatusFlags = 0x006F; +static constexpr AttributeId ApplicationType = 0x0100; +} // namespace Ids +} // namespace Attributes +} // namespace BinaryInputBasic + +namespace PowerProfile { +namespace Attributes { +namespace Ids { +static constexpr AttributeId TotalProfileNum = 0x0000; +static constexpr AttributeId MultipleScheduling = 0x0001; +static constexpr AttributeId EnergyFormatting = 0x0002; +static constexpr AttributeId EnergyRemote = 0x0003; +static constexpr AttributeId ScheduleMode = 0x0004; +} // namespace Ids +} // namespace Attributes +} // namespace PowerProfile + +namespace ApplianceControl { +namespace Attributes { +namespace Ids { +static constexpr AttributeId StartTime = 0x0000; +static constexpr AttributeId FinishTime = 0x0001; +static constexpr AttributeId RemainingTime = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace ApplianceControl + +namespace Descriptor { +namespace Attributes { +namespace Ids { +static constexpr AttributeId DeviceList = 0x0000; +static constexpr AttributeId ServerList = 0x0001; +static constexpr AttributeId ClientList = 0x0002; +static constexpr AttributeId PartsList = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace Descriptor + +namespace PollControl { +namespace Attributes { +namespace Ids { +static constexpr AttributeId CheckInInterval = 0x0000; +static constexpr AttributeId LongPollInterval = 0x0001; +static constexpr AttributeId ShortPollInterval = 0x0002; +static constexpr AttributeId FastPollTimeout = 0x0003; +static constexpr AttributeId CheckInIntervalMin = 0x0004; +static constexpr AttributeId LongPollIntervalMin = 0x0005; +static constexpr AttributeId FastPollTimeoutMax = 0x0006; +} // namespace Ids +} // namespace Attributes +} // namespace PollControl + +namespace Basic { +namespace Attributes { +namespace Ids { +static constexpr AttributeId InteractionModelVersion = 0x0000; +static constexpr AttributeId VendorName = 0x0001; +static constexpr AttributeId VendorID = 0x0002; +static constexpr AttributeId ProductName = 0x0003; +static constexpr AttributeId ProductID = 0x0004; +static constexpr AttributeId UserLabel = 0x0005; +static constexpr AttributeId Location = 0x0006; +static constexpr AttributeId HardwareVersion = 0x0007; +static constexpr AttributeId HardwareVersionString = 0x0008; +static constexpr AttributeId SoftwareVersion = 0x0009; +static constexpr AttributeId SoftwareVersionString = 0x000A; +static constexpr AttributeId ManufacturingDate = 0x000B; +static constexpr AttributeId PartNumber = 0x000C; +static constexpr AttributeId ProductURL = 0x000D; +static constexpr AttributeId ProductLabel = 0x000E; +static constexpr AttributeId SerialNumber = 0x000F; +static constexpr AttributeId LocalConfigDisabled = 0x0010; +static constexpr AttributeId Reachable = 0x0011; +} // namespace Ids +} // namespace Attributes +} // namespace Basic + +namespace GeneralCommissioning { +namespace Attributes { +namespace Ids { +static constexpr AttributeId FabricId = 0x0000; +static constexpr AttributeId Breadcrumb = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace GeneralCommissioning + +namespace GeneralDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr AttributeId NetworkInterfaces = 0x0000; +static constexpr AttributeId RebootCount = 0x0001; +static constexpr AttributeId UpTime = 0x0002; +static constexpr AttributeId TotalOperationalHours = 0x0003; +static constexpr AttributeId BootReasons = 0x0004; +static constexpr AttributeId ActiveHardwareFaults = 0x0005; +static constexpr AttributeId ActiveRadioFaults = 0x0006; +static constexpr AttributeId ActiveNetworkFaults = 0x0007; +} // namespace Ids +} // namespace Attributes +} // namespace GeneralDiagnostics + +namespace SoftwareDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr AttributeId ThreadMetrics = 0x0000; +static constexpr AttributeId CurrentHeapFree = 0x0001; +static constexpr AttributeId CurrentHeapUsed = 0x0002; +static constexpr AttributeId CurrentHeapHighWatermark = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace SoftwareDiagnostics + +namespace ThreadNetworkDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr AttributeId Channel = 0x0000; +static constexpr AttributeId RoutingRole = 0x0001; +static constexpr AttributeId NetworkName = 0x0002; +static constexpr AttributeId PanId = 0x0003; +static constexpr AttributeId ExtendedPanId = 0x0004; +static constexpr AttributeId MeshLocalPrefix = 0x0005; +static constexpr AttributeId OverrunCount = 0x0006; +static constexpr AttributeId NeighborTableList = 0x0007; +static constexpr AttributeId RouteTableList = 0x0008; +static constexpr AttributeId PartitionId = 0x0009; +static constexpr AttributeId Weighting = 0x000A; +static constexpr AttributeId DataVersion = 0x000B; +static constexpr AttributeId StableDataVersion = 0x000C; +static constexpr AttributeId LeaderRouterId = 0x000D; +static constexpr AttributeId DetachedRoleCount = 0x000E; +static constexpr AttributeId ChildRoleCount = 0x000F; +static constexpr AttributeId RouterRoleCount = 0x0010; +static constexpr AttributeId LeaderRoleCount = 0x0011; +static constexpr AttributeId AttachAttemptCount = 0x0012; +static constexpr AttributeId PartitionIdChangeCount = 0x0013; +static constexpr AttributeId BetterPartitionAttachAttemptCount = 0x0014; +static constexpr AttributeId ParentChangeCount = 0x0015; +static constexpr AttributeId TxTotalCount = 0x0016; +static constexpr AttributeId TxUnicastCount = 0x0017; +static constexpr AttributeId TxBroadcastCount = 0x0018; +static constexpr AttributeId TxAckRequestedCount = 0x0019; +static constexpr AttributeId TxAckedCount = 0x001A; +static constexpr AttributeId TxNoAckRequestedCount = 0x001B; +static constexpr AttributeId TxDataCount = 0x001C; +static constexpr AttributeId TxDataPollCount = 0x001D; +static constexpr AttributeId TxBeaconCount = 0x001E; +static constexpr AttributeId TxBeaconRequestCount = 0x001F; +static constexpr AttributeId TxOtherCount = 0x0020; +static constexpr AttributeId TxRetryCount = 0x0021; +static constexpr AttributeId TxDirectMaxRetryExpiryCount = 0x0022; +static constexpr AttributeId TxIndirectMaxRetryExpiryCount = 0x0023; +static constexpr AttributeId TxErrCcaCount = 0x0024; +static constexpr AttributeId TxErrAbortCount = 0x0025; +static constexpr AttributeId TxErrBusyChannelCount = 0x0026; +static constexpr AttributeId RxTotalCount = 0x0027; +static constexpr AttributeId RxUnicastCount = 0x0028; +static constexpr AttributeId RxBroadcastCount = 0x0029; +static constexpr AttributeId RxDataCount = 0x002A; +static constexpr AttributeId RxDataPollCount = 0x002B; +static constexpr AttributeId RxBeaconCount = 0x002C; +static constexpr AttributeId RxBeaconRequestCount = 0x002D; +static constexpr AttributeId RxOtherCount = 0x002E; +static constexpr AttributeId RxAddressFilteredCount = 0x002F; +static constexpr AttributeId RxDestAddrFilteredCount = 0x0030; +static constexpr AttributeId RxDuplicatedCount = 0x0031; +static constexpr AttributeId RxErrNoFrameCount = 0x0032; +static constexpr AttributeId RxErrUnknownNeighborCount = 0x0033; +static constexpr AttributeId RxErrInvalidSrcAddrCount = 0x0034; +static constexpr AttributeId RxErrSecCount = 0x0035; +static constexpr AttributeId RxErrFcsCount = 0x0036; +static constexpr AttributeId RxErrOtherCount = 0x0037; +static constexpr AttributeId ActiveTimestamp = 0x0038; +static constexpr AttributeId PendingTimestamp = 0x0039; +static constexpr AttributeId Delay = 0x003A; +static constexpr AttributeId SecurityPolicy = 0x003B; +static constexpr AttributeId ChannelMask = 0x003C; +static constexpr AttributeId OperationalDatasetComponents = 0x003D; +static constexpr AttributeId ActiveNetworkFaultsList = 0x003E; +} // namespace Ids +} // namespace Attributes +} // namespace ThreadNetworkDiagnostics + +namespace WiFiNetworkDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr AttributeId Bssid = 0x0000; +static constexpr AttributeId SecurityType = 0x0001; +static constexpr AttributeId WiFiVersion = 0x0002; +static constexpr AttributeId ChannelNumber = 0x0003; +static constexpr AttributeId Rssi = 0x0004; +static constexpr AttributeId BeaconLostCount = 0x0005; +static constexpr AttributeId BeaconRxCount = 0x0006; +static constexpr AttributeId PacketMulticastRxCount = 0x0007; +static constexpr AttributeId PacketMulticastTxCount = 0x0008; +static constexpr AttributeId PacketUnicastRxCount = 0x0009; +static constexpr AttributeId PacketUnicastTxCount = 0x000A; +static constexpr AttributeId CurrentMaxRate = 0x000B; +static constexpr AttributeId OverrunCount = 0x000C; +} // namespace Ids +} // namespace Attributes +} // namespace WiFiNetworkDiagnostics + +namespace EthernetNetworkDiagnostics { +namespace Attributes { +namespace Ids { +static constexpr AttributeId PHYRate = 0x0000; +static constexpr AttributeId FullDuplex = 0x0001; +static constexpr AttributeId PacketRxCount = 0x0002; +static constexpr AttributeId PacketTxCount = 0x0003; +static constexpr AttributeId TxErrCount = 0x0004; +static constexpr AttributeId CollisionCount = 0x0005; +static constexpr AttributeId OverrunCount = 0x0006; +static constexpr AttributeId CarrierDetect = 0x0007; +static constexpr AttributeId TimeSinceReset = 0x0008; +} // namespace Ids +} // namespace Attributes +} // namespace EthernetNetworkDiagnostics + +namespace BridgedDeviceBasic { +namespace Attributes { +namespace Ids { +static constexpr AttributeId VendorName = 0x0001; +static constexpr AttributeId VendorID = 0x0002; +static constexpr AttributeId ProductName = 0x0003; +static constexpr AttributeId UserLabel = 0x0005; +static constexpr AttributeId HardwareVersion = 0x0007; +static constexpr AttributeId HardwareVersionString = 0x0008; +static constexpr AttributeId SoftwareVersion = 0x0009; +static constexpr AttributeId SoftwareVersionString = 0x000A; +static constexpr AttributeId ManufacturingDate = 0x000B; +static constexpr AttributeId PartNumber = 0x000C; +static constexpr AttributeId ProductURL = 0x000D; +static constexpr AttributeId ProductLabel = 0x000E; +static constexpr AttributeId SerialNumber = 0x000F; +static constexpr AttributeId Reachable = 0x0011; +} // namespace Ids +} // namespace Attributes +} // namespace BridgedDeviceBasic + +namespace Switch { +namespace Attributes { +namespace Ids { +static constexpr AttributeId NumberOfPositions = 0x0000; +static constexpr AttributeId CurrentPosition = 0x0001; +static constexpr AttributeId MultiPressMax = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace Switch + +namespace OperationalCredentials { +namespace Attributes { +namespace Ids { +static constexpr AttributeId FabricsList = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace OperationalCredentials + +namespace FixedLabel { +namespace Attributes { +namespace Ids { +static constexpr AttributeId LabelList = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace FixedLabel + +namespace ShadeConfiguration { +namespace Attributes { +namespace Ids { +static constexpr AttributeId PhysicalClosedLimit = 0x0000; +static constexpr AttributeId MotorStepSize = 0x0001; +static constexpr AttributeId Status = 0x0002; +static constexpr AttributeId ClosedLimit = 0x0010; +static constexpr AttributeId Mode = 0x0011; +} // namespace Ids +} // namespace Attributes +} // namespace ShadeConfiguration + +namespace DoorLock { +namespace Attributes { +namespace Ids { +static constexpr AttributeId LockState = 0x0000; +static constexpr AttributeId LockType = 0x0001; +static constexpr AttributeId ActuatorEnabled = 0x0002; +static constexpr AttributeId DoorState = 0x0003; +static constexpr AttributeId DoorOpenEvents = 0x0004; +static constexpr AttributeId DoorClosedEvents = 0x0005; +static constexpr AttributeId OpenPeriod = 0x0006; +static constexpr AttributeId NumLockRecordsSupported = 0x0010; +static constexpr AttributeId NumTotalUsersSupported = 0x0011; +static constexpr AttributeId NumPinUsersSupported = 0x0012; +static constexpr AttributeId NumRfidUsersSupported = 0x0013; +static constexpr AttributeId NumWeekdaySchedulesSupportedPerUser = 0x0014; +static constexpr AttributeId NumYeardaySchedulesSupportedPerUser = 0x0015; +static constexpr AttributeId NumHolidaySchedulesSupportedPerUser = 0x0016; +static constexpr AttributeId MaxPinLength = 0x0017; +static constexpr AttributeId MinPinLength = 0x0018; +static constexpr AttributeId MaxRfidCodeLength = 0x0019; +static constexpr AttributeId MinRfidCodeLength = 0x001A; +static constexpr AttributeId EnableLogging = 0x0020; +static constexpr AttributeId Language = 0x0021; +static constexpr AttributeId LedSettings = 0x0022; +static constexpr AttributeId AutoRelockTime = 0x0023; +static constexpr AttributeId SoundVolume = 0x0024; +static constexpr AttributeId OperatingMode = 0x0025; +static constexpr AttributeId SupportedOperatingModes = 0x0026; +static constexpr AttributeId DefaultConfigurationRegister = 0x0027; +static constexpr AttributeId EnableLocalProgramming = 0x0028; +static constexpr AttributeId EnableOneTouchLocking = 0x0029; +static constexpr AttributeId EnableInsideStatusLed = 0x002A; +static constexpr AttributeId EnablePrivacyModeButton = 0x002B; +static constexpr AttributeId WrongCodeEntryLimit = 0x0030; +static constexpr AttributeId UserCodeTemporaryDisableTime = 0x0031; +static constexpr AttributeId SendPinOverTheAir = 0x0032; +static constexpr AttributeId RequirePinForRfOperation = 0x0033; +static constexpr AttributeId ZigbeeSecurityLevel = 0x0034; +static constexpr AttributeId AlarmMask = 0x0040; +static constexpr AttributeId KeypadOperationEventMask = 0x0041; +static constexpr AttributeId RfOperationEventMask = 0x0042; +static constexpr AttributeId ManualOperationEventMask = 0x0043; +static constexpr AttributeId RfidOperationEventMask = 0x0044; +static constexpr AttributeId KeypadProgrammingEventMask = 0x0045; +static constexpr AttributeId RfProgrammingEventMask = 0x0046; +static constexpr AttributeId RfidProgrammingEventMask = 0x0047; +} // namespace Ids +} // namespace Attributes +} // namespace DoorLock + +namespace WindowCovering { +namespace Attributes { +namespace Ids { +static constexpr AttributeId Type = 0x0000; +static constexpr AttributeId PhysicalClosedLimitLift = 0x0001; +static constexpr AttributeId PhysicalClosedLimitTilt = 0x0002; +static constexpr AttributeId CurrentPositionLift = 0x0003; +static constexpr AttributeId CurrentPositionTilt = 0x0004; +static constexpr AttributeId NumberOfActuationsLift = 0x0005; +static constexpr AttributeId NumberOfActuationsTilt = 0x0006; +static constexpr AttributeId ConfigStatus = 0x0007; +static constexpr AttributeId CurrentPositionLiftPercentage = 0x0008; +static constexpr AttributeId CurrentPositionTiltPercentage = 0x0009; +static constexpr AttributeId OperationalStatus = 0x000A; +static constexpr AttributeId TargetPositionLiftPercent100ths = 0x000B; +static constexpr AttributeId TargetPositionTiltPercent100ths = 0x000C; +static constexpr AttributeId EndProductType = 0x000D; +static constexpr AttributeId CurrentPositionLiftPercent100ths = 0x000E; +static constexpr AttributeId CurrentPositionTiltPercent100ths = 0x000F; +static constexpr AttributeId InstalledOpenLimitLift = 0x0010; +static constexpr AttributeId InstalledClosedLimitLift = 0x0011; +static constexpr AttributeId InstalledOpenLimitTilt = 0x0012; +static constexpr AttributeId InstalledClosedLimitTilt = 0x0013; +static constexpr AttributeId VelocityLift = 0x0014; +static constexpr AttributeId AccelerationTimeLift = 0x0015; +static constexpr AttributeId DecelerationTimeLift = 0x0016; +static constexpr AttributeId Mode = 0x0017; +static constexpr AttributeId IntermediateSetpointsLift = 0x0018; +static constexpr AttributeId IntermediateSetpointsTilt = 0x0019; +static constexpr AttributeId SafetyStatus = 0x001A; +} // namespace Ids +} // namespace Attributes +} // namespace WindowCovering + +namespace BarrierControl { +namespace Attributes { +namespace Ids { +static constexpr AttributeId BarrierMovingState = 0x0001; +static constexpr AttributeId BarrierSafetyStatus = 0x0002; +static constexpr AttributeId BarrierCapabilities = 0x0003; +static constexpr AttributeId BarrierOpenEvents = 0x0004; +static constexpr AttributeId BarrierCloseEvents = 0x0005; +static constexpr AttributeId BarrierCommandOpenEvents = 0x0006; +static constexpr AttributeId BarrierCommandCloseEvents = 0x0007; +static constexpr AttributeId BarrierOpenPeriod = 0x0008; +static constexpr AttributeId BarrierClosePeriod = 0x0009; +static constexpr AttributeId BarrierPosition = 0x000A; +} // namespace Ids +} // namespace Attributes +} // namespace BarrierControl + +namespace PumpConfigurationAndControl { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MaxPressure = 0x0000; +static constexpr AttributeId MaxSpeed = 0x0001; +static constexpr AttributeId MaxFlow = 0x0002; +static constexpr AttributeId MinConstPressure = 0x0003; +static constexpr AttributeId MaxConstPressure = 0x0004; +static constexpr AttributeId MinCompPressure = 0x0005; +static constexpr AttributeId MaxCompPressure = 0x0006; +static constexpr AttributeId MinConstSpeed = 0x0007; +static constexpr AttributeId MaxConstSpeed = 0x0008; +static constexpr AttributeId MinConstFlow = 0x0009; +static constexpr AttributeId MaxConstFlow = 0x000A; +static constexpr AttributeId MinConstTemp = 0x000B; +static constexpr AttributeId MaxConstTemp = 0x000C; +static constexpr AttributeId PumpStatus = 0x0010; +static constexpr AttributeId EffectiveOperationMode = 0x0011; +static constexpr AttributeId EffectiveControlMode = 0x0012; +static constexpr AttributeId Capacity = 0x0013; +static constexpr AttributeId Speed = 0x0014; +static constexpr AttributeId LifetimeRunningHours = 0x0015; +static constexpr AttributeId Power = 0x0016; +static constexpr AttributeId LifetimeEnergyConsumed = 0x0017; +static constexpr AttributeId OperationMode = 0x0020; +static constexpr AttributeId ControlMode = 0x0021; +static constexpr AttributeId AlarmMask = 0x0022; +} // namespace Ids +} // namespace Attributes +} // namespace PumpConfigurationAndControl + +namespace Thermostat { +namespace Attributes { +namespace Ids { +static constexpr AttributeId LocalTemperature = 0x0000; +static constexpr AttributeId OutdoorTemperature = 0x0001; +static constexpr AttributeId Occupancy = 0x0002; +static constexpr AttributeId AbsMinHeatSetpointLimit = 0x0003; +static constexpr AttributeId AbsMaxHeatSetpointLimit = 0x0004; +static constexpr AttributeId AbsMinCoolSetpointLimit = 0x0005; +static constexpr AttributeId AbsMaxCoolSetpointLimit = 0x0006; +static constexpr AttributeId PiCoolingDemand = 0x0007; +static constexpr AttributeId PiHeatingDemand = 0x0008; +static constexpr AttributeId HvacSystemTypeConfiguration = 0x0009; +static constexpr AttributeId LocalTemperatureCalibration = 0x0010; +static constexpr AttributeId OccupiedCoolingSetpoint = 0x0011; +static constexpr AttributeId OccupiedHeatingSetpoint = 0x0012; +static constexpr AttributeId UnoccupiedCoolingSetpoint = 0x0013; +static constexpr AttributeId UnoccupiedHeatingSetpoint = 0x0014; +static constexpr AttributeId MinHeatSetpointLimit = 0x0015; +static constexpr AttributeId MaxHeatSetpointLimit = 0x0016; +static constexpr AttributeId MinCoolSetpointLimit = 0x0017; +static constexpr AttributeId MaxCoolSetpointLimit = 0x0018; +static constexpr AttributeId MinSetpointDeadBand = 0x0019; +static constexpr AttributeId RemoteSensing = 0x001A; +static constexpr AttributeId ControlSequenceOfOperation = 0x001B; +static constexpr AttributeId SystemMode = 0x001C; +static constexpr AttributeId AlarmMask = 0x001D; +static constexpr AttributeId ThermostatRunningMode = 0x001E; +static constexpr AttributeId StartOfWeek = 0x0020; +static constexpr AttributeId NumberOfWeeklyTransitions = 0x0021; +static constexpr AttributeId NumberOfDailyTransitions = 0x0022; +static constexpr AttributeId TemperatureSetpointHold = 0x0023; +static constexpr AttributeId TemperatureSetpointHoldDuration = 0x0024; +static constexpr AttributeId ThermostatProgrammingOperationMode = 0x0025; +static constexpr AttributeId HvacRelayState = 0x0029; +static constexpr AttributeId SetpointChangeSource = 0x0030; +static constexpr AttributeId SetpointChangeAmount = 0x0031; +static constexpr AttributeId SetpointChangeSourceTimestamp = 0x0032; +static constexpr AttributeId AcType = 0x0040; +static constexpr AttributeId AcCapacity = 0x0041; +static constexpr AttributeId AcRefrigerantType = 0x0042; +static constexpr AttributeId AcCompressor = 0x0043; +static constexpr AttributeId AcErrorCode = 0x0044; +static constexpr AttributeId AcLouverPosition = 0x0045; +static constexpr AttributeId AcCoilTemperature = 0x0046; +static constexpr AttributeId AcCapacityFormat = 0x0047; +} // namespace Ids +} // namespace Attributes +} // namespace Thermostat + +namespace FanControl { +namespace Attributes { +namespace Ids { +static constexpr AttributeId FanMode = 0x0000; +static constexpr AttributeId FanModeSequence = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace FanControl + +namespace DehumidificationControl { +namespace Attributes { +namespace Ids { +static constexpr AttributeId RelativeHumidity = 0x0000; +static constexpr AttributeId DehumidificationCooling = 0x0001; +static constexpr AttributeId RhDehumidificationSetpoint = 0x0010; +static constexpr AttributeId RelativeHumidityMode = 0x0011; +static constexpr AttributeId DehumidificationLockout = 0x0012; +static constexpr AttributeId DehumidificationHysteresis = 0x0013; +static constexpr AttributeId DehumidificationMaxCool = 0x0014; +static constexpr AttributeId RelativeHumidityDisplay = 0x0015; +} // namespace Ids +} // namespace Attributes +} // namespace DehumidificationControl + +namespace ThermostatUserInterfaceConfiguration { +namespace Attributes { +namespace Ids { +static constexpr AttributeId TemperatureDisplayMode = 0x0000; +static constexpr AttributeId KeypadLockout = 0x0001; +static constexpr AttributeId ScheduleProgrammingVisibility = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace ThermostatUserInterfaceConfiguration + +namespace ColorControl { +namespace Attributes { +namespace Ids { +static constexpr AttributeId CurrentHue = 0x0000; +static constexpr AttributeId CurrentSaturation = 0x0001; +static constexpr AttributeId RemainingTime = 0x0002; +static constexpr AttributeId CurrentX = 0x0003; +static constexpr AttributeId CurrentY = 0x0004; +static constexpr AttributeId DriftCompensation = 0x0005; +static constexpr AttributeId CompensationText = 0x0006; +static constexpr AttributeId ColorTemperature = 0x0007; +static constexpr AttributeId ColorMode = 0x0008; +static constexpr AttributeId ColorControlOptions = 0x000F; +static constexpr AttributeId NumberOfPrimaries = 0x0010; +static constexpr AttributeId Primary1X = 0x0011; +static constexpr AttributeId Primary1Y = 0x0012; +static constexpr AttributeId Primary1Intensity = 0x0013; +static constexpr AttributeId Primary2X = 0x0015; +static constexpr AttributeId Primary2Y = 0x0016; +static constexpr AttributeId Primary2Intensity = 0x0017; +static constexpr AttributeId Primary3X = 0x0019; +static constexpr AttributeId Primary3Y = 0x001A; +static constexpr AttributeId Primary3Intensity = 0x001B; +static constexpr AttributeId Primary4X = 0x0020; +static constexpr AttributeId Primary4Y = 0x0021; +static constexpr AttributeId Primary4Intensity = 0x0022; +static constexpr AttributeId Primary5X = 0x0024; +static constexpr AttributeId Primary5Y = 0x0025; +static constexpr AttributeId Primary5Intensity = 0x0026; +static constexpr AttributeId Primary6X = 0x0028; +static constexpr AttributeId Primary6Y = 0x0029; +static constexpr AttributeId Primary6Intensity = 0x002A; +static constexpr AttributeId WhitePointX = 0x0030; +static constexpr AttributeId WhitePointY = 0x0031; +static constexpr AttributeId ColorPointRX = 0x0032; +static constexpr AttributeId ColorPointRY = 0x0033; +static constexpr AttributeId ColorPointRIntensity = 0x0034; +static constexpr AttributeId ColorPointGX = 0x0036; +static constexpr AttributeId ColorPointGY = 0x0037; +static constexpr AttributeId ColorPointGIntensity = 0x0038; +static constexpr AttributeId ColorPointBX = 0x003A; +static constexpr AttributeId ColorPointBY = 0x003B; +static constexpr AttributeId ColorPointBIntensity = 0x003C; +static constexpr AttributeId EnhancedCurrentHue = 0x4000; +static constexpr AttributeId EnhancedColorMode = 0x4001; +static constexpr AttributeId ColorLoopActive = 0x4002; +static constexpr AttributeId ColorLoopDirection = 0x4003; +static constexpr AttributeId ColorLoopTime = 0x4004; +static constexpr AttributeId ColorLoopStartEnhancedHue = 0x4005; +static constexpr AttributeId ColorLoopStoredEnhancedHue = 0x4006; +static constexpr AttributeId ColorCapabilities = 0x400A; +static constexpr AttributeId ColorTempPhysicalMin = 0x400B; +static constexpr AttributeId ColorTempPhysicalMax = 0x400C; +static constexpr AttributeId CoupleColorTempToLevelMinMireds = 0x400D; +static constexpr AttributeId StartUpColorTemperatureMireds = 0x4010; +} // namespace Ids +} // namespace Attributes +} // namespace ColorControl + +namespace BallastConfiguration { +namespace Attributes { +namespace Ids { +static constexpr AttributeId PhysicalMinLevel = 0x0000; +static constexpr AttributeId PhysicalMaxLevel = 0x0001; +static constexpr AttributeId BallastStatus = 0x0002; +static constexpr AttributeId MinLevel = 0x0010; +static constexpr AttributeId MaxLevel = 0x0011; +static constexpr AttributeId PowerOnLevel = 0x0012; +static constexpr AttributeId PowerOnFadeTime = 0x0013; +static constexpr AttributeId IntrinsicBallastFactor = 0x0014; +static constexpr AttributeId BallastFactorAdjustment = 0x0015; +static constexpr AttributeId LampQuality = 0x0020; +static constexpr AttributeId LampType = 0x0030; +static constexpr AttributeId LampManufacturer = 0x0031; +static constexpr AttributeId LampRatedHours = 0x0032; +static constexpr AttributeId LampBurnHours = 0x0033; +static constexpr AttributeId LampAlarmMode = 0x0034; +static constexpr AttributeId LampBurnHoursTripPoint = 0x0035; +} // namespace Ids +} // namespace Attributes +} // namespace BallastConfiguration + +namespace IlluminanceMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +static constexpr AttributeId LightSensorType = 0x0004; +} // namespace Ids +} // namespace Attributes +} // namespace IlluminanceMeasurement + +namespace IlluminanceLevelSensing { +namespace Attributes { +namespace Ids { +static constexpr AttributeId LevelStatus = 0x0000; +static constexpr AttributeId LightSensorType = 0x0001; +static constexpr AttributeId IlluminanceLevelTarget = 0x0010; +} // namespace Ids +} // namespace Attributes +} // namespace IlluminanceLevelSensing + +namespace TemperatureMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace TemperatureMeasurement + +namespace PressureMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +static constexpr AttributeId ScaledValue = 0x0010; +static constexpr AttributeId MinScaledValue = 0x0011; +static constexpr AttributeId MaxScaledValue = 0x0012; +static constexpr AttributeId ScaledTolerance = 0x0013; +static constexpr AttributeId Scale = 0x0014; +} // namespace Ids +} // namespace Attributes +} // namespace PressureMeasurement + +namespace FlowMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace FlowMeasurement + +namespace RelativeHumidityMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace RelativeHumidityMeasurement + +namespace OccupancySensing { +namespace Attributes { +namespace Ids { +static constexpr AttributeId Occupancy = 0x0000; +static constexpr AttributeId OccupancySensorType = 0x0001; +static constexpr AttributeId OccupancySensorTypeBitmap = 0x0002; +static constexpr AttributeId PirOccupiedToUnoccupiedDelay = 0x0010; +static constexpr AttributeId PirUnoccupiedToOccupiedDelay = 0x0011; +static constexpr AttributeId PirUnoccupiedToOccupiedThreshold = 0x0012; +static constexpr AttributeId UltrasonicOccupiedToUnoccupiedDelay = 0x0020; +static constexpr AttributeId UltrasonicUnoccupiedToOccupiedDelay = 0x0021; +static constexpr AttributeId UltrasonicUnoccupiedToOccupiedThreshold = 0x0022; +static constexpr AttributeId PhysicalContactOccupiedToUnoccupiedDelay = 0x0030; +static constexpr AttributeId PhysicalContactUnoccupiedToOccupiedDelay = 0x0031; +static constexpr AttributeId PhysicalContactUnoccupiedToOccupiedThreshold = 0x0032; +} // namespace Ids +} // namespace Attributes +} // namespace OccupancySensing + +namespace CarbonMonoxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace CarbonMonoxideConcentrationMeasurement + +namespace CarbonDioxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace CarbonDioxideConcentrationMeasurement + +namespace EthyleneConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace EthyleneConcentrationMeasurement + +namespace EthyleneOxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace EthyleneOxideConcentrationMeasurement + +namespace HydrogenConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace HydrogenConcentrationMeasurement + +namespace HydrogenSulphideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace HydrogenSulphideConcentrationMeasurement + +namespace NitricOxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace NitricOxideConcentrationMeasurement + +namespace NitrogenDioxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace NitrogenDioxideConcentrationMeasurement + +namespace OxygenConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace OxygenConcentrationMeasurement + +namespace OzoneConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace OzoneConcentrationMeasurement + +namespace SulfurDioxideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace SulfurDioxideConcentrationMeasurement + +namespace DissolvedOxygenConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace DissolvedOxygenConcentrationMeasurement + +namespace BromateConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace BromateConcentrationMeasurement + +namespace ChloraminesConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ChloraminesConcentrationMeasurement + +namespace ChlorineConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ChlorineConcentrationMeasurement + +namespace FecalColiformAndEColiConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace FecalColiformAndEColiConcentrationMeasurement + +namespace FluorideConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace FluorideConcentrationMeasurement + +namespace HaloaceticAcidsConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace HaloaceticAcidsConcentrationMeasurement + +namespace TotalTrihalomethanesConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace TotalTrihalomethanesConcentrationMeasurement + +namespace TotalColiformBacteriaConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace TotalColiformBacteriaConcentrationMeasurement + +namespace TurbidityConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace TurbidityConcentrationMeasurement + +namespace CopperConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace CopperConcentrationMeasurement + +namespace LeadConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace LeadConcentrationMeasurement + +namespace ManganeseConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ManganeseConcentrationMeasurement + +namespace SulfateConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace SulfateConcentrationMeasurement + +namespace BromodichloromethaneConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace BromodichloromethaneConcentrationMeasurement + +namespace BromoformConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace BromoformConcentrationMeasurement + +namespace ChlorodibromomethaneConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ChlorodibromomethaneConcentrationMeasurement + +namespace ChloroformConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace ChloroformConcentrationMeasurement + +namespace SodiumConcentrationMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasuredValue = 0x0000; +static constexpr AttributeId MinMeasuredValue = 0x0001; +static constexpr AttributeId MaxMeasuredValue = 0x0002; +static constexpr AttributeId Tolerance = 0x0003; +} // namespace Ids +} // namespace Attributes +} // namespace SodiumConcentrationMeasurement + +namespace IasZone { +namespace Attributes { +namespace Ids { +static constexpr AttributeId ZoneState = 0x0000; +static constexpr AttributeId ZoneType = 0x0001; +static constexpr AttributeId ZoneStatus = 0x0002; +static constexpr AttributeId IasCieAddress = 0x0010; +static constexpr AttributeId ZoneId = 0x0011; +static constexpr AttributeId NumberOfZoneSensitivityLevelsSupported = 0x0012; +static constexpr AttributeId CurrentZoneSensitivityLevel = 0x0013; +} // namespace Ids +} // namespace Attributes +} // namespace IasZone + +namespace IasWd { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MaxDuration = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace IasWd + +namespace WakeOnLan { +namespace Attributes { +namespace Ids { +static constexpr AttributeId WakeOnLanMacAddress = 0x0000; +} // namespace Ids +} // namespace Attributes +} // namespace WakeOnLan + +namespace TvChannel { +namespace Attributes { +namespace Ids { +static constexpr AttributeId TvChannelList = 0x0000; +static constexpr AttributeId TvChannelLineup = 0x0001; +static constexpr AttributeId CurrentTvChannel = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace TvChannel + +namespace TargetNavigator { +namespace Attributes { +namespace Ids { +static constexpr AttributeId TargetNavigatorList = 0x0000; +static constexpr AttributeId CurrentNavigatorTarget = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace TargetNavigator + +namespace MediaPlayback { +namespace Attributes { +namespace Ids { +static constexpr AttributeId PlaybackState = 0x0000; +static constexpr AttributeId StartTime = 0x0001; +static constexpr AttributeId Duration = 0x0002; +static constexpr AttributeId UpdatedAt = 0x0003; +static constexpr AttributeId Posistion = 0x0004; +static constexpr AttributeId PlaybackSpeed = 0x0005; +static constexpr AttributeId SeekRangeEnd = 0x0006; +static constexpr AttributeId SeekRangeStart = 0x0007; +} // namespace Ids +} // namespace Attributes +} // namespace MediaPlayback + +namespace MediaInput { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MediaInputList = 0x0000; +static constexpr AttributeId CurrentMediaInput = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace MediaInput + +namespace ContentLauncher { +namespace Attributes { +namespace Ids { +static constexpr AttributeId AcceptsHeaderList = 0x0000; +static constexpr AttributeId SupportedStreamingTypes = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace ContentLauncher + +namespace AudioOutput { +namespace Attributes { +namespace Ids { +static constexpr AttributeId AudioOutputList = 0x0000; +static constexpr AttributeId CurrentAudioOutput = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace AudioOutput + +namespace ApplicationLauncher { +namespace Attributes { +namespace Ids { +static constexpr AttributeId ApplicationLauncherList = 0x0000; +static constexpr AttributeId CatalogVendorId = 0x0001; +static constexpr AttributeId ApplicationId = 0x0002; +} // namespace Ids +} // namespace Attributes +} // namespace ApplicationLauncher + +namespace ApplicationBasic { +namespace Attributes { +namespace Ids { +static constexpr AttributeId VendorName = 0x0000; +static constexpr AttributeId VendorId = 0x0001; +static constexpr AttributeId ApplicationName = 0x0002; +static constexpr AttributeId ProductId = 0x0003; +static constexpr AttributeId ApplicationId = 0x0005; +static constexpr AttributeId CatalogVendorId = 0x0006; +static constexpr AttributeId ApplicationSatus = 0x0007; +} // namespace Ids +} // namespace Attributes +} // namespace ApplicationBasic + +namespace TestCluster { +namespace Attributes { +namespace Ids { +static constexpr AttributeId Boolean = 0x0000; +static constexpr AttributeId Bitmap8 = 0x0001; +static constexpr AttributeId Bitmap16 = 0x0002; +static constexpr AttributeId Bitmap32 = 0x0003; +static constexpr AttributeId Bitmap64 = 0x0004; +static constexpr AttributeId Int8u = 0x0005; +static constexpr AttributeId Int16u = 0x0006; +static constexpr AttributeId Int32u = 0x0008; +static constexpr AttributeId Int64u = 0x000C; +static constexpr AttributeId Int8s = 0x000D; +static constexpr AttributeId Int16s = 0x000E; +static constexpr AttributeId Int32s = 0x0010; +static constexpr AttributeId Int64s = 0x0014; +static constexpr AttributeId Enum8 = 0x0015; +static constexpr AttributeId Enum16 = 0x0016; +static constexpr AttributeId OctetString = 0x0019; +static constexpr AttributeId ListInt8u = 0x001A; +static constexpr AttributeId ListOctetString = 0x001B; +static constexpr AttributeId ListStructOctetString = 0x001C; +static constexpr AttributeId LongOctetString = 0x001D; +static constexpr AttributeId Unsupported = 0x00FF; +} // namespace Ids +} // namespace Attributes +} // namespace TestCluster + +namespace ApplianceIdentification { +namespace Attributes { +namespace Ids { +static constexpr AttributeId BasicIdentification = 0x0000; +static constexpr AttributeId CompanyName = 0x0010; +static constexpr AttributeId CompanyId = 0x0011; +static constexpr AttributeId BrandName = 0x0012; +static constexpr AttributeId BrandId = 0x0013; +static constexpr AttributeId Model = 0x0014; +static constexpr AttributeId PartNumber = 0x0015; +static constexpr AttributeId ProductRevision = 0x0016; +static constexpr AttributeId SoftwareRevision = 0x0017; +static constexpr AttributeId ProductTypeName = 0x0018; +static constexpr AttributeId ProductTypeId = 0x0019; +static constexpr AttributeId CecedSpecificationVersion = 0x001A; +} // namespace Ids +} // namespace Attributes +} // namespace ApplianceIdentification + +namespace MeterIdentification { +namespace Attributes { +namespace Ids { +static constexpr AttributeId CompanyName = 0x0000; +static constexpr AttributeId MeterTypeId = 0x0001; +static constexpr AttributeId DataQualityId = 0x0004; +static constexpr AttributeId CustomerName = 0x0005; +static constexpr AttributeId Model = 0x0006; +static constexpr AttributeId PartNumber = 0x0007; +static constexpr AttributeId ProductRevision = 0x0008; +static constexpr AttributeId SoftwareRevision = 0x000A; +static constexpr AttributeId UtilityName = 0x000B; +static constexpr AttributeId Pod = 0x000C; +static constexpr AttributeId AvailablePower = 0x000D; +static constexpr AttributeId PowerThreshold = 0x000E; +} // namespace Ids +} // namespace Attributes +} // namespace MeterIdentification + +namespace ApplianceStatistics { +namespace Attributes { +namespace Ids { +static constexpr AttributeId LogMaxSize = 0x0000; +static constexpr AttributeId LogQueueMaxSize = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace ApplianceStatistics + +namespace ElectricalMeasurement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId MeasurementType = 0x0000; +static constexpr AttributeId DcVoltage = 0x0100; +static constexpr AttributeId DcVoltageMin = 0x0101; +static constexpr AttributeId DcVoltageMax = 0x0102; +static constexpr AttributeId DcCurrent = 0x0103; +static constexpr AttributeId DcCurrentMin = 0x0104; +static constexpr AttributeId DcCurrentMax = 0x0105; +static constexpr AttributeId DcPower = 0x0106; +static constexpr AttributeId DcPowerMin = 0x0107; +static constexpr AttributeId DcPowerMax = 0x0108; +static constexpr AttributeId DcVoltageMultiplier = 0x0200; +static constexpr AttributeId DcVoltageDivisor = 0x0201; +static constexpr AttributeId DcCurrentMultiplier = 0x0202; +static constexpr AttributeId DcCurrentDivisor = 0x0203; +static constexpr AttributeId DcPowerMultiplier = 0x0204; +static constexpr AttributeId DcPowerDivisor = 0x0205; +static constexpr AttributeId AcFrequency = 0x0300; +static constexpr AttributeId AcFrequencyMin = 0x0301; +static constexpr AttributeId AcFrequencyMax = 0x0302; +static constexpr AttributeId NeutralCurrent = 0x0303; +static constexpr AttributeId TotalActivePower = 0x0304; +static constexpr AttributeId TotalReactivePower = 0x0305; +static constexpr AttributeId TotalApparentPower = 0x0306; +static constexpr AttributeId Measured1stHarmonicCurrent = 0x0307; +static constexpr AttributeId Measured3rdHarmonicCurrent = 0x0308; +static constexpr AttributeId Measured5thHarmonicCurrent = 0x0309; +static constexpr AttributeId Measured7thHarmonicCurrent = 0x030A; +static constexpr AttributeId Measured9thHarmonicCurrent = 0x030B; +static constexpr AttributeId Measured11thHarmonicCurrent = 0x030C; +static constexpr AttributeId MeasuredPhase1stHarmonicCurrent = 0x030D; +static constexpr AttributeId MeasuredPhase3rdHarmonicCurrent = 0x030E; +static constexpr AttributeId MeasuredPhase5thHarmonicCurrent = 0x030F; +static constexpr AttributeId MeasuredPhase7thHarmonicCurrent = 0x0310; +static constexpr AttributeId MeasuredPhase9thHarmonicCurrent = 0x0311; +static constexpr AttributeId MeasuredPhase11thHarmonicCurrent = 0x0312; +static constexpr AttributeId AcFrequencyMultiplier = 0x0400; +static constexpr AttributeId AcFrequencyDivisor = 0x0401; +static constexpr AttributeId PowerMultiplier = 0x0402; +static constexpr AttributeId PowerDivisor = 0x0403; +static constexpr AttributeId HarmonicCurrentMultiplier = 0x0404; +static constexpr AttributeId PhaseHarmonicCurrentMultiplier = 0x0405; +static constexpr AttributeId InstantaneousVoltage = 0x0500; +static constexpr AttributeId InstantaneousLineCurrent = 0x0501; +static constexpr AttributeId InstantaneousActiveCurrent = 0x0502; +static constexpr AttributeId InstantaneousReactiveCurrent = 0x0503; +static constexpr AttributeId InstantaneousPower = 0x0504; +static constexpr AttributeId RmsVoltage = 0x0505; +static constexpr AttributeId RmsVoltageMin = 0x0506; +static constexpr AttributeId RmsVoltageMax = 0x0507; +static constexpr AttributeId RmsCurrent = 0x0508; +static constexpr AttributeId RmsCurrentMin = 0x0509; +static constexpr AttributeId RmsCurrentMax = 0x050A; +static constexpr AttributeId ActivePower = 0x050B; +static constexpr AttributeId ActivePowerMin = 0x050C; +static constexpr AttributeId ActivePowerMax = 0x050D; +static constexpr AttributeId ReactivePower = 0x050E; +static constexpr AttributeId ApparentPower = 0x050F; +static constexpr AttributeId PowerFactor = 0x0510; +static constexpr AttributeId AverageRmsVoltageMeasurementPeriod = 0x0511; +static constexpr AttributeId AverageRmsUnderVoltageCounter = 0x0513; +static constexpr AttributeId RmsExtremeOverVoltagePeriod = 0x0514; +static constexpr AttributeId RmsExtremeUnderVoltagePeriod = 0x0515; +static constexpr AttributeId RmsVoltageSagPeriod = 0x0516; +static constexpr AttributeId RmsVoltageSwellPeriod = 0x0517; +static constexpr AttributeId AcVoltageMultiplier = 0x0600; +static constexpr AttributeId AcVoltageDivisor = 0x0601; +static constexpr AttributeId AcCurrentMultiplier = 0x0602; +static constexpr AttributeId AcCurrentDivisor = 0x0603; +static constexpr AttributeId AcPowerMultiplier = 0x0604; +static constexpr AttributeId AcPowerDivisor = 0x0605; +static constexpr AttributeId OverloadAlarmsMask = 0x0700; +static constexpr AttributeId VoltageOverload = 0x0701; +static constexpr AttributeId CurrentOverload = 0x0702; +static constexpr AttributeId AcOverloadAlarmsMask = 0x0800; +static constexpr AttributeId AcVoltageOverload = 0x0801; +static constexpr AttributeId AcCurrentOverload = 0x0802; +static constexpr AttributeId AcActivePowerOverload = 0x0803; +static constexpr AttributeId AcReactivePowerOverload = 0x0804; +static constexpr AttributeId AverageRmsOverVoltage = 0x0805; +static constexpr AttributeId AverageRmsUnderVoltage = 0x0806; +static constexpr AttributeId RmsExtremeOverVoltage = 0x0807; +static constexpr AttributeId RmsExtremeUnderVoltage = 0x0808; +static constexpr AttributeId RmsVoltageSag = 0x0809; +static constexpr AttributeId RmsVoltageSwell = 0x080A; +static constexpr AttributeId LineCurrentPhaseB = 0x0901; +static constexpr AttributeId ActiveCurrentPhaseB = 0x0902; +static constexpr AttributeId ReactiveCurrentPhaseB = 0x0903; +static constexpr AttributeId RmsVoltagePhaseB = 0x0905; +static constexpr AttributeId RmsVoltageMinPhaseB = 0x0906; +static constexpr AttributeId RmsVoltageMaxPhaseB = 0x0907; +static constexpr AttributeId RmsCurrentPhaseB = 0x0908; +static constexpr AttributeId RmsCurrentMinPhaseB = 0x0909; +static constexpr AttributeId RmsCurrentMaxPhaseB = 0x090A; +static constexpr AttributeId ActivePowerPhaseB = 0x090B; +static constexpr AttributeId ActivePowerMinPhaseB = 0x090C; +static constexpr AttributeId ActivePowerMaxPhaseB = 0x090D; +static constexpr AttributeId ReactivePowerPhaseB = 0x090E; +static constexpr AttributeId ApparentPowerPhaseB = 0x090F; +static constexpr AttributeId PowerFactorPhaseB = 0x0910; +static constexpr AttributeId AverageRmsVoltageMeasurementPeriodPhaseB = 0x0911; +static constexpr AttributeId AverageRmsOverVoltageCounterPhaseB = 0x0912; +static constexpr AttributeId AverageRmsUnderVoltageCounterPhaseB = 0x0913; +static constexpr AttributeId RmsExtremeOverVoltagePeriodPhaseB = 0x0914; +static constexpr AttributeId RmsExtremeUnderVoltagePeriodPhaseB = 0x0915; +static constexpr AttributeId RmsVoltageSagPeriodPhaseB = 0x0916; +static constexpr AttributeId RmsVoltageSwellPeriodPhaseB = 0x0917; +static constexpr AttributeId LineCurrentPhaseC = 0x0A01; +static constexpr AttributeId ActiveCurrentPhaseC = 0x0A02; +static constexpr AttributeId ReactiveCurrentPhaseC = 0x0A03; +static constexpr AttributeId RmsVoltagePhaseC = 0x0A05; +static constexpr AttributeId RmsVoltageMinPhaseC = 0x0A06; +static constexpr AttributeId RmsVoltageMaxPhaseC = 0x0A07; +static constexpr AttributeId RmsCurrentPhaseC = 0x0A08; +static constexpr AttributeId RmsCurrentMinPhaseC = 0x0A09; +static constexpr AttributeId RmsCurrentMaxPhaseC = 0x0A0A; +static constexpr AttributeId ActivePowerPhaseC = 0x0A0B; +static constexpr AttributeId ActivePowerMinPhaseC = 0x0A0C; +static constexpr AttributeId ActivePowerMaxPhaseC = 0x0A0D; +static constexpr AttributeId ReactivePowerPhaseC = 0x0A0E; +static constexpr AttributeId ApparentPowerPhaseC = 0x0A0F; +static constexpr AttributeId PowerFactorPhaseC = 0x0A10; +static constexpr AttributeId AverageRmsVoltageMeasurementPeriodPhaseC = 0x0A11; +static constexpr AttributeId AverageRmsOverVoltageCounterPhaseC = 0x0A12; +static constexpr AttributeId AverageRmsUnderVoltageCounterPhaseC = 0x0A13; +static constexpr AttributeId RmsExtremeOverVoltagePeriodPhaseC = 0x0A14; +static constexpr AttributeId RmsExtremeUnderVoltagePeriodPhaseC = 0x0A15; +static constexpr AttributeId RmsVoltageSagPeriodPhaseC = 0x0A16; +static constexpr AttributeId RmsVoltageSwellPeriodPhaseC = 0x0A17; +} // namespace Ids +} // namespace Attributes +} // namespace ElectricalMeasurement + +namespace GroupKeyManagement { +namespace Attributes { +namespace Ids { +static constexpr AttributeId Groups = 0x0000; +static constexpr AttributeId GroupKeys = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace GroupKeyManagement + +namespace SampleMfgSpecificCluster { +namespace Attributes { +namespace Ids { +static constexpr AttributeId EmberSampleAttribute = 0x0000; +static constexpr AttributeId EmberSampleAttribute2 = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace SampleMfgSpecificCluster + +namespace SampleMfgSpecificCluster2 { +namespace Attributes { +namespace Ids { +static constexpr AttributeId EmberSampleAttribute3 = 0x0000; +static constexpr AttributeId EmberSampleAttribute4 = 0x0001; +} // namespace Ids +} // namespace Attributes +} // namespace SampleMfgSpecificCluster2 + +} // namespace Clusters +} // 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..ce9d6b1f43ab58 --- /dev/null +++ b/src/app/common/gen/ids/Clusters.h @@ -0,0 +1,343 @@ +/* + * + * 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 Clusters { + +namespace PowerConfiguration { +static constexpr ClusterId Id = 0x0001; +} // namespace PowerConfiguration +namespace DeviceTemperatureConfiguration { +static constexpr ClusterId Id = 0x0002; +} // namespace DeviceTemperatureConfiguration +namespace Identify { +static constexpr ClusterId Id = 0x0003; +} // namespace Identify +namespace Groups { +static constexpr ClusterId Id = 0x0004; +} // namespace Groups +namespace Scenes { +static constexpr ClusterId Id = 0x0005; +} // namespace Scenes +namespace OnOff { +static constexpr ClusterId Id = 0x0006; +} // namespace OnOff +namespace OnOffSwitchConfiguration { +static constexpr ClusterId Id = 0x0007; +} // namespace OnOffSwitchConfiguration +namespace LevelControl { +static constexpr ClusterId Id = 0x0008; +} // namespace LevelControl +namespace Alarms { +static constexpr ClusterId Id = 0x0009; +} // namespace Alarms +namespace Time { +static constexpr ClusterId Id = 0x000A; +} // namespace Time +namespace BinaryInputBasic { +static constexpr ClusterId Id = 0x000F; +} // namespace BinaryInputBasic +namespace PowerProfile { +static constexpr ClusterId Id = 0x001A; +} // namespace PowerProfile +namespace ApplianceControl { +static constexpr ClusterId Id = 0x001B; +} // namespace ApplianceControl +namespace Descriptor { +static constexpr ClusterId Id = 0x001D; +} // namespace Descriptor +namespace PollControl { +static constexpr ClusterId Id = 0x0020; +} // namespace PollControl +namespace Basic { +static constexpr ClusterId Id = 0x0028; +} // namespace Basic +namespace OtaSoftwareUpdateProvider { +static constexpr ClusterId Id = 0x0029; +} // namespace OtaSoftwareUpdateProvider +namespace OtaSoftwareUpdateRequestor { +static constexpr ClusterId Id = 0x002A; +} // namespace OtaSoftwareUpdateRequestor +namespace GeneralCommissioning { +static constexpr ClusterId Id = 0x0030; +} // namespace GeneralCommissioning +namespace NetworkCommissioning { +static constexpr ClusterId Id = 0x0031; +} // namespace NetworkCommissioning +namespace DiagnosticLogs { +static constexpr ClusterId Id = 0x0032; +} // namespace DiagnosticLogs +namespace GeneralDiagnostics { +static constexpr ClusterId Id = 0x0033; +} // namespace GeneralDiagnostics +namespace SoftwareDiagnostics { +static constexpr ClusterId Id = 0x0034; +} // namespace SoftwareDiagnostics +namespace ThreadNetworkDiagnostics { +static constexpr ClusterId Id = 0x0035; +} // namespace ThreadNetworkDiagnostics +namespace WiFiNetworkDiagnostics { +static constexpr ClusterId Id = 0x0036; +} // namespace WiFiNetworkDiagnostics +namespace EthernetNetworkDiagnostics { +static constexpr ClusterId Id = 0x0037; +} // namespace EthernetNetworkDiagnostics +namespace BridgedDeviceBasic { +static constexpr ClusterId Id = 0x0039; +} // namespace BridgedDeviceBasic +namespace Switch { +static constexpr ClusterId Id = 0x003B; +} // namespace Switch +namespace OperationalCredentials { +static constexpr ClusterId Id = 0x003E; +} // namespace OperationalCredentials +namespace FixedLabel { +static constexpr ClusterId Id = 0x0040; +} // namespace FixedLabel +namespace ShadeConfiguration { +static constexpr ClusterId Id = 0x0100; +} // namespace ShadeConfiguration +namespace DoorLock { +static constexpr ClusterId Id = 0x0101; +} // namespace DoorLock +namespace WindowCovering { +static constexpr ClusterId Id = 0x0102; +} // namespace WindowCovering +namespace BarrierControl { +static constexpr ClusterId Id = 0x0103; +} // namespace BarrierControl +namespace PumpConfigurationAndControl { +static constexpr ClusterId Id = 0x0200; +} // namespace PumpConfigurationAndControl +namespace Thermostat { +static constexpr ClusterId Id = 0x0201; +} // namespace Thermostat +namespace FanControl { +static constexpr ClusterId Id = 0x0202; +} // namespace FanControl +namespace DehumidificationControl { +static constexpr ClusterId Id = 0x0203; +} // namespace DehumidificationControl +namespace ThermostatUserInterfaceConfiguration { +static constexpr ClusterId Id = 0x0204; +} // namespace ThermostatUserInterfaceConfiguration +namespace ColorControl { +static constexpr ClusterId Id = 0x0300; +} // namespace ColorControl +namespace BallastConfiguration { +static constexpr ClusterId Id = 0x0301; +} // namespace BallastConfiguration +namespace IlluminanceMeasurement { +static constexpr ClusterId Id = 0x0400; +} // namespace IlluminanceMeasurement +namespace IlluminanceLevelSensing { +static constexpr ClusterId Id = 0x0401; +} // namespace IlluminanceLevelSensing +namespace TemperatureMeasurement { +static constexpr ClusterId Id = 0x0402; +} // namespace TemperatureMeasurement +namespace PressureMeasurement { +static constexpr ClusterId Id = 0x0403; +} // namespace PressureMeasurement +namespace FlowMeasurement { +static constexpr ClusterId Id = 0x0404; +} // namespace FlowMeasurement +namespace RelativeHumidityMeasurement { +static constexpr ClusterId Id = 0x0405; +} // namespace RelativeHumidityMeasurement +namespace OccupancySensing { +static constexpr ClusterId Id = 0x0406; +} // namespace OccupancySensing +namespace CarbonMonoxideConcentrationMeasurement { +static constexpr ClusterId Id = 0x040C; +} // namespace CarbonMonoxideConcentrationMeasurement +namespace CarbonDioxideConcentrationMeasurement { +static constexpr ClusterId Id = 0x040D; +} // namespace CarbonDioxideConcentrationMeasurement +namespace EthyleneConcentrationMeasurement { +static constexpr ClusterId Id = 0x040E; +} // namespace EthyleneConcentrationMeasurement +namespace EthyleneOxideConcentrationMeasurement { +static constexpr ClusterId Id = 0x040F; +} // namespace EthyleneOxideConcentrationMeasurement +namespace HydrogenConcentrationMeasurement { +static constexpr ClusterId Id = 0x0410; +} // namespace HydrogenConcentrationMeasurement +namespace HydrogenSulphideConcentrationMeasurement { +static constexpr ClusterId Id = 0x0411; +} // namespace HydrogenSulphideConcentrationMeasurement +namespace NitricOxideConcentrationMeasurement { +static constexpr ClusterId Id = 0x0412; +} // namespace NitricOxideConcentrationMeasurement +namespace NitrogenDioxideConcentrationMeasurement { +static constexpr ClusterId Id = 0x0413; +} // namespace NitrogenDioxideConcentrationMeasurement +namespace OxygenConcentrationMeasurement { +static constexpr ClusterId Id = 0x0414; +} // namespace OxygenConcentrationMeasurement +namespace OzoneConcentrationMeasurement { +static constexpr ClusterId Id = 0x0415; +} // namespace OzoneConcentrationMeasurement +namespace SulfurDioxideConcentrationMeasurement { +static constexpr ClusterId Id = 0x0416; +} // namespace SulfurDioxideConcentrationMeasurement +namespace DissolvedOxygenConcentrationMeasurement { +static constexpr ClusterId Id = 0x0417; +} // namespace DissolvedOxygenConcentrationMeasurement +namespace BromateConcentrationMeasurement { +static constexpr ClusterId Id = 0x0418; +} // namespace BromateConcentrationMeasurement +namespace ChloraminesConcentrationMeasurement { +static constexpr ClusterId Id = 0x0419; +} // namespace ChloraminesConcentrationMeasurement +namespace ChlorineConcentrationMeasurement { +static constexpr ClusterId Id = 0x041A; +} // namespace ChlorineConcentrationMeasurement +namespace FecalColiformAndEColiConcentrationMeasurement { +static constexpr ClusterId Id = 0x041B; +} // namespace FecalColiformAndEColiConcentrationMeasurement +namespace FluorideConcentrationMeasurement { +static constexpr ClusterId Id = 0x041C; +} // namespace FluorideConcentrationMeasurement +namespace HaloaceticAcidsConcentrationMeasurement { +static constexpr ClusterId Id = 0x041D; +} // namespace HaloaceticAcidsConcentrationMeasurement +namespace TotalTrihalomethanesConcentrationMeasurement { +static constexpr ClusterId Id = 0x041E; +} // namespace TotalTrihalomethanesConcentrationMeasurement +namespace TotalColiformBacteriaConcentrationMeasurement { +static constexpr ClusterId Id = 0x041F; +} // namespace TotalColiformBacteriaConcentrationMeasurement +namespace TurbidityConcentrationMeasurement { +static constexpr ClusterId Id = 0x0420; +} // namespace TurbidityConcentrationMeasurement +namespace CopperConcentrationMeasurement { +static constexpr ClusterId Id = 0x0421; +} // namespace CopperConcentrationMeasurement +namespace LeadConcentrationMeasurement { +static constexpr ClusterId Id = 0x0422; +} // namespace LeadConcentrationMeasurement +namespace ManganeseConcentrationMeasurement { +static constexpr ClusterId Id = 0x0423; +} // namespace ManganeseConcentrationMeasurement +namespace SulfateConcentrationMeasurement { +static constexpr ClusterId Id = 0x0424; +} // namespace SulfateConcentrationMeasurement +namespace BromodichloromethaneConcentrationMeasurement { +static constexpr ClusterId Id = 0x0425; +} // namespace BromodichloromethaneConcentrationMeasurement +namespace BromoformConcentrationMeasurement { +static constexpr ClusterId Id = 0x0426; +} // namespace BromoformConcentrationMeasurement +namespace ChlorodibromomethaneConcentrationMeasurement { +static constexpr ClusterId Id = 0x0427; +} // namespace ChlorodibromomethaneConcentrationMeasurement +namespace ChloroformConcentrationMeasurement { +static constexpr ClusterId Id = 0x0428; +} // namespace ChloroformConcentrationMeasurement +namespace SodiumConcentrationMeasurement { +static constexpr ClusterId Id = 0x0429; +} // namespace SodiumConcentrationMeasurement +namespace IasZone { +static constexpr ClusterId Id = 0x0500; +} // namespace IasZone +namespace IasAce { +static constexpr ClusterId Id = 0x0501; +} // namespace IasAce +namespace IasWd { +static constexpr ClusterId Id = 0x0502; +} // namespace IasWd +namespace WakeOnLan { +static constexpr ClusterId Id = 0x0503; +} // namespace WakeOnLan +namespace TvChannel { +static constexpr ClusterId Id = 0x0504; +} // namespace TvChannel +namespace TargetNavigator { +static constexpr ClusterId Id = 0x0505; +} // namespace TargetNavigator +namespace MediaPlayback { +static constexpr ClusterId Id = 0x0506; +} // namespace MediaPlayback +namespace MediaInput { +static constexpr ClusterId Id = 0x0507; +} // namespace MediaInput +namespace LowPower { +static constexpr ClusterId Id = 0x0508; +} // namespace LowPower +namespace KeypadInput { +static constexpr ClusterId Id = 0x0509; +} // namespace KeypadInput +namespace ContentLauncher { +static constexpr ClusterId Id = 0x050A; +} // namespace ContentLauncher +namespace AudioOutput { +static constexpr ClusterId Id = 0x050B; +} // namespace AudioOutput +namespace ApplicationLauncher { +static constexpr ClusterId Id = 0x050C; +} // namespace ApplicationLauncher +namespace ApplicationBasic { +static constexpr ClusterId Id = 0x050D; +} // namespace ApplicationBasic +namespace AccountLogin { +static constexpr ClusterId Id = 0x050E; +} // namespace AccountLogin +namespace TestCluster { +static constexpr ClusterId Id = 0x050F; +} // namespace TestCluster +namespace Messaging { +static constexpr ClusterId Id = 0x0703; +} // namespace Messaging +namespace ApplianceIdentification { +static constexpr ClusterId Id = 0x0B00; +} // namespace ApplianceIdentification +namespace MeterIdentification { +static constexpr ClusterId Id = 0x0B01; +} // namespace MeterIdentification +namespace ApplianceEventsAndAlert { +static constexpr ClusterId Id = 0x0B02; +} // namespace ApplianceEventsAndAlert +namespace ApplianceStatistics { +static constexpr ClusterId Id = 0x0B03; +} // namespace ApplianceStatistics +namespace ElectricalMeasurement { +static constexpr ClusterId Id = 0x0B04; +} // namespace ElectricalMeasurement +namespace Binding { +static constexpr ClusterId Id = 0xF000; +} // namespace Binding +namespace GroupKeyManagement { +static constexpr ClusterId Id = 0xF004; +} // namespace GroupKeyManagement +namespace SampleMfgSpecificCluster { +static constexpr ClusterId Id = 0xFC00; +} // namespace SampleMfgSpecificCluster +namespace SampleMfgSpecificCluster2 { +static constexpr ClusterId Id = 0xFC00; +} // namespace SampleMfgSpecificCluster2 + +} // namespace Clusters +} // 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..358ab71870c228 --- /dev/null +++ b/src/app/common/gen/ids/Commands.h @@ -0,0 +1,738 @@ +/* + * + * 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 Clusters { + +namespace Globals { +namespace Commands { +namespace Ids { +static constexpr CommandId ReadAttributes = 0x00; +static constexpr CommandId ReadAttributesResponse = 0x01; +static constexpr CommandId WriteAttributes = 0x02; +static constexpr CommandId WriteAttributesUndivided = 0x03; +static constexpr CommandId WriteAttributesResponse = 0x04; +static constexpr CommandId WriteAttributesNoResponse = 0x05; +static constexpr CommandId ConfigureReporting = 0x06; +static constexpr CommandId ConfigureReportingResponse = 0x07; +static constexpr CommandId ReadReportingConfiguration = 0x08; +static constexpr CommandId ReadReportingConfigurationResponse = 0x09; +static constexpr CommandId ReportAttributes = 0x0A; +static constexpr CommandId DefaultResponse = 0x0B; +static constexpr CommandId DiscoverAttributes = 0x0C; +static constexpr CommandId DiscoverAttributesResponse = 0x0D; +static constexpr CommandId ReadAttributesStructured = 0x0E; +static constexpr CommandId WriteAttributesStructured = 0x0F; +static constexpr CommandId WriteAttributesStructuredResponse = 0x10; +static constexpr CommandId DiscoverCommandsReceived = 0x11; +static constexpr CommandId DiscoverCommandsReceivedResponse = 0x12; +static constexpr CommandId DiscoverCommandsGenerated = 0x13; +static constexpr CommandId DiscoverCommandsGeneratedResponse = 0x14; +static constexpr CommandId DiscoverAttributesExtended = 0x15; +static constexpr CommandId DiscoverAttributesExtendedResponse = 0x16; +} // namespace Ids +} // namespace Commands +} // namespace Globals + +namespace Identify { +namespace Commands { +namespace Ids { +static constexpr CommandId Identify = 0x00; +static constexpr CommandId IdentifyQueryResponse = 0x00; +static constexpr CommandId IdentifyQuery = 0x01; +static constexpr CommandId EZModeInvoke = 0x02; +static constexpr CommandId UpdateCommissionState = 0x03; +static constexpr CommandId TriggerEffect = 0x40; +} // namespace Ids +} // namespace Commands +} // namespace Identify + +namespace Groups { +namespace Commands { +namespace Ids { +static constexpr CommandId AddGroup = 0x00; +static constexpr CommandId AddGroupResponse = 0x00; +static constexpr CommandId ViewGroup = 0x01; +static constexpr CommandId ViewGroupResponse = 0x01; +static constexpr CommandId GetGroupMembership = 0x02; +static constexpr CommandId GetGroupMembershipResponse = 0x02; +static constexpr CommandId RemoveGroup = 0x03; +static constexpr CommandId RemoveGroupResponse = 0x03; +static constexpr CommandId RemoveAllGroups = 0x04; +static constexpr CommandId AddGroupIfIdentifying = 0x05; +} // namespace Ids +} // namespace Commands +} // namespace Groups + +namespace Scenes { +namespace Commands { +namespace Ids { +static constexpr CommandId AddScene = 0x00; +static constexpr CommandId AddSceneResponse = 0x00; +static constexpr CommandId ViewScene = 0x01; +static constexpr CommandId ViewSceneResponse = 0x01; +static constexpr CommandId RemoveScene = 0x02; +static constexpr CommandId RemoveSceneResponse = 0x02; +static constexpr CommandId RemoveAllScenes = 0x03; +static constexpr CommandId RemoveAllScenesResponse = 0x03; +static constexpr CommandId StoreScene = 0x04; +static constexpr CommandId StoreSceneResponse = 0x04; +static constexpr CommandId RecallScene = 0x05; +static constexpr CommandId GetSceneMembership = 0x06; +static constexpr CommandId GetSceneMembershipResponse = 0x06; +static constexpr CommandId EnhancedAddScene = 0x40; +static constexpr CommandId EnhancedAddSceneResponse = 0x40; +static constexpr CommandId EnhancedViewScene = 0x41; +static constexpr CommandId EnhancedViewSceneResponse = 0x41; +static constexpr CommandId CopyScene = 0x42; +static constexpr CommandId CopySceneResponse = 0x42; +} // namespace Ids +} // namespace Commands +} // namespace Scenes + +namespace OnOff { +namespace Commands { +namespace Ids { +static constexpr CommandId Off = 0x00; +static constexpr CommandId SampleMfgSpecificOffWithTransition = 0x00; +static constexpr CommandId On = 0x01; +static constexpr CommandId SampleMfgSpecificOnWithTransition = 0x01; +static constexpr CommandId SampleMfgSpecificOnWithTransition2 = 0x01; +static constexpr CommandId Toggle = 0x02; +static constexpr CommandId SampleMfgSpecificToggleWithTransition = 0x02; +static constexpr CommandId SampleMfgSpecificToggleWithTransition2 = 0x02; +static constexpr CommandId OffWithEffect = 0x40; +static constexpr CommandId OnWithRecallGlobalScene = 0x41; +static constexpr CommandId OnWithTimedOff = 0x42; +} // namespace Ids +} // namespace Commands +} // namespace OnOff + +namespace LevelControl { +namespace Commands { +namespace Ids { +static constexpr CommandId MoveToLevel = 0x00; +static constexpr CommandId Move = 0x01; +static constexpr CommandId Step = 0x02; +static constexpr CommandId Stop = 0x03; +static constexpr CommandId MoveToLevelWithOnOff = 0x04; +static constexpr CommandId MoveWithOnOff = 0x05; +static constexpr CommandId StepWithOnOff = 0x06; +static constexpr CommandId StopWithOnOff = 0x07; +} // namespace Ids +} // namespace Commands +} // namespace LevelControl + +namespace Alarms { +namespace Commands { +namespace Ids { +static constexpr CommandId ResetAlarm = 0x00; +static constexpr CommandId Alarm = 0x00; +static constexpr CommandId ResetAllAlarms = 0x01; +static constexpr CommandId GetAlarmResponse = 0x01; +static constexpr CommandId GetAlarm = 0x02; +static constexpr CommandId ResetAlarmLog = 0x03; +} // namespace Ids +} // namespace Commands +} // namespace Alarms + +namespace PowerProfile { +namespace Commands { +namespace Ids { +static constexpr CommandId PowerProfileRequest = 0x00; +static constexpr CommandId PowerProfileNotification = 0x00; +static constexpr CommandId PowerProfileStateRequest = 0x01; +static constexpr CommandId PowerProfileResponse = 0x01; +static constexpr CommandId GetPowerProfilePriceResponse = 0x02; +static constexpr CommandId PowerProfileStateResponse = 0x02; +static constexpr CommandId GetOverallSchedulePriceResponse = 0x03; +static constexpr CommandId GetPowerProfilePrice = 0x03; +static constexpr CommandId EnergyPhasesScheduleNotification = 0x04; +static constexpr CommandId PowerProfilesStateNotification = 0x04; +static constexpr CommandId EnergyPhasesScheduleResponse = 0x05; +static constexpr CommandId GetOverallSchedulePrice = 0x05; +static constexpr CommandId PowerProfileScheduleConstraintsRequest = 0x06; +static constexpr CommandId EnergyPhasesScheduleRequest = 0x06; +static constexpr CommandId EnergyPhasesScheduleStateRequest = 0x07; +static constexpr CommandId EnergyPhasesScheduleStateResponse = 0x07; +static constexpr CommandId GetPowerProfilePriceExtendedResponse = 0x08; +static constexpr CommandId EnergyPhasesScheduleStateNotification = 0x08; +static constexpr CommandId PowerProfileScheduleConstraintsNotification = 0x09; +static constexpr CommandId PowerProfileScheduleConstraintsResponse = 0x0A; +static constexpr CommandId GetPowerProfilePriceExtended = 0x0B; +} // namespace Ids +} // namespace Commands +} // namespace PowerProfile + +namespace ApplianceControl { +namespace Commands { +namespace Ids { +static constexpr CommandId ExecutionOfACommand = 0x00; +static constexpr CommandId SignalStateResponse = 0x00; +static constexpr CommandId SignalState = 0x01; +static constexpr CommandId SignalStateNotification = 0x01; +static constexpr CommandId WriteFunctions = 0x02; +static constexpr CommandId OverloadPauseResume = 0x03; +static constexpr CommandId OverloadPause = 0x04; +static constexpr CommandId OverloadWarning = 0x05; +} // namespace Ids +} // namespace Commands +} // namespace ApplianceControl + +namespace PollControl { +namespace Commands { +namespace Ids { +static constexpr CommandId CheckIn = 0x00; +static constexpr CommandId CheckInResponse = 0x00; +static constexpr CommandId FastPollStop = 0x01; +static constexpr CommandId SetLongPollInterval = 0x02; +static constexpr CommandId SetShortPollInterval = 0x03; +} // namespace Ids +} // namespace Commands +} // namespace PollControl + +namespace Basic { +namespace Commands { +namespace Ids { +static constexpr CommandId StartUp = 0x00; +static constexpr CommandId MfgSpecificPing = 0x00; +static constexpr CommandId ShutDown = 0x01; +static constexpr CommandId Leave = 0x02; +} // namespace Ids +} // namespace Commands +} // namespace Basic + +namespace OtaSoftwareUpdateProvider { +namespace Commands { +namespace Ids { +static constexpr CommandId QueryImage = 0x00; +static constexpr CommandId ApplyUpdateRequest = 0x01; +static constexpr CommandId NotifyUpdateApplied = 0x02; +static constexpr CommandId QueryImageResponse = 0x03; +static constexpr CommandId ApplyUpdateRequestResponse = 0x04; +} // namespace Ids +} // namespace Commands +} // namespace OtaSoftwareUpdateProvider + +namespace OtaSoftwareUpdateRequestor { +namespace Commands { +namespace Ids { +static constexpr CommandId AnnounceOtaProvider = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace OtaSoftwareUpdateRequestor + +namespace GeneralCommissioning { +namespace Commands { +namespace Ids { +static constexpr CommandId ArmFailSafe = 0x00; +static constexpr CommandId ArmFailSafeResponse = 0x01; +static constexpr CommandId SetRegulatoryConfig = 0x02; +static constexpr CommandId SetRegulatoryConfigResponse = 0x03; +static constexpr CommandId CommissioningComplete = 0x04; +static constexpr CommandId CommissioningCompleteResponse = 0x05; +} // namespace Ids +} // namespace Commands +} // namespace GeneralCommissioning + +namespace NetworkCommissioning { +namespace Commands { +namespace Ids { +static constexpr CommandId ScanNetworks = 0x00; +static constexpr CommandId ScanNetworksResponse = 0x01; +static constexpr CommandId AddWiFiNetwork = 0x02; +static constexpr CommandId AddWiFiNetworkResponse = 0x03; +static constexpr CommandId UpdateWiFiNetwork = 0x04; +static constexpr CommandId UpdateWiFiNetworkResponse = 0x05; +static constexpr CommandId AddThreadNetwork = 0x06; +static constexpr CommandId AddThreadNetworkResponse = 0x07; +static constexpr CommandId UpdateThreadNetwork = 0x08; +static constexpr CommandId UpdateThreadNetworkResponse = 0x09; +static constexpr CommandId RemoveNetwork = 0x0A; +static constexpr CommandId RemoveNetworkResponse = 0x0B; +static constexpr CommandId EnableNetwork = 0x0C; +static constexpr CommandId EnableNetworkResponse = 0x0D; +static constexpr CommandId DisableNetwork = 0x0E; +static constexpr CommandId DisableNetworkResponse = 0x0F; +static constexpr CommandId GetLastNetworkCommissioningResult = 0x10; +} // namespace Ids +} // namespace Commands +} // namespace NetworkCommissioning + +namespace DiagnosticLogs { +namespace Commands { +namespace Ids { +static constexpr CommandId RetrieveLogsRequest = 0x00; +static constexpr CommandId RetrieveLogsResponse = 0x01; +} // namespace Ids +} // namespace Commands +} // namespace DiagnosticLogs + +namespace SoftwareDiagnostics { +namespace Commands { +namespace Ids { +static constexpr CommandId ResetWatermarks = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace SoftwareDiagnostics + +namespace ThreadNetworkDiagnostics { +namespace Commands { +namespace Ids { +static constexpr CommandId ResetCounts = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace ThreadNetworkDiagnostics + +namespace WiFiNetworkDiagnostics { +namespace Commands { +namespace Ids { +static constexpr CommandId ResetCounts = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace WiFiNetworkDiagnostics + +namespace EthernetNetworkDiagnostics { +namespace Commands { +namespace Ids { +static constexpr CommandId ResetCounts = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace EthernetNetworkDiagnostics + +namespace BridgedDeviceBasic { +namespace Commands { +namespace Ids { +static constexpr CommandId StartUp = 0x00; +static constexpr CommandId ShutDown = 0x01; +static constexpr CommandId Leave = 0x02; +static constexpr CommandId ReachableChanged = 0x03; +} // namespace Ids +} // namespace Commands +} // namespace BridgedDeviceBasic + +namespace OperationalCredentials { +namespace Commands { +namespace Ids { +static constexpr CommandId SetFabric = 0x00; +static constexpr CommandId SetFabricResponse = 0x01; +static constexpr CommandId OpCSRRequest = 0x04; +static constexpr CommandId OpCSRResponse = 0x05; +static constexpr CommandId AddOpCert = 0x06; +static constexpr CommandId OpCertResponse = 0x08; +static constexpr CommandId UpdateFabricLabel = 0x09; +static constexpr CommandId RemoveFabric = 0x0A; +static constexpr CommandId RemoveAllFabrics = 0x0B; +static constexpr CommandId AddTrustedRootCertificate = 0xA1; +static constexpr CommandId RemoveTrustedRootCertificate = 0xA2; +} // namespace Ids +} // namespace Commands +} // namespace OperationalCredentials + +namespace DoorLock { +namespace Commands { +namespace Ids { +static constexpr CommandId LockDoor = 0x00; +static constexpr CommandId LockDoorResponse = 0x00; +static constexpr CommandId UnlockDoor = 0x01; +static constexpr CommandId UnlockDoorResponse = 0x01; +static constexpr CommandId Toggle = 0x02; +static constexpr CommandId ToggleResponse = 0x02; +static constexpr CommandId UnlockWithTimeout = 0x03; +static constexpr CommandId UnlockWithTimeoutResponse = 0x03; +static constexpr CommandId GetLogRecord = 0x04; +static constexpr CommandId GetLogRecordResponse = 0x04; +static constexpr CommandId SetPin = 0x05; +static constexpr CommandId SetPinResponse = 0x05; +static constexpr CommandId GetPin = 0x06; +static constexpr CommandId GetPinResponse = 0x06; +static constexpr CommandId ClearPin = 0x07; +static constexpr CommandId ClearPinResponse = 0x07; +static constexpr CommandId ClearAllPins = 0x08; +static constexpr CommandId ClearAllPinsResponse = 0x08; +static constexpr CommandId SetUserStatus = 0x09; +static constexpr CommandId SetUserStatusResponse = 0x09; +static constexpr CommandId GetUserStatus = 0x0A; +static constexpr CommandId GetUserStatusResponse = 0x0A; +static constexpr CommandId SetWeekdaySchedule = 0x0B; +static constexpr CommandId SetWeekdayScheduleResponse = 0x0B; +static constexpr CommandId GetWeekdaySchedule = 0x0C; +static constexpr CommandId GetWeekdayScheduleResponse = 0x0C; +static constexpr CommandId ClearWeekdaySchedule = 0x0D; +static constexpr CommandId ClearWeekdayScheduleResponse = 0x0D; +static constexpr CommandId SetYeardaySchedule = 0x0E; +static constexpr CommandId SetYeardayScheduleResponse = 0x0E; +static constexpr CommandId GetYeardaySchedule = 0x0F; +static constexpr CommandId GetYeardayScheduleResponse = 0x0F; +static constexpr CommandId ClearYeardaySchedule = 0x10; +static constexpr CommandId ClearYeardayScheduleResponse = 0x10; +static constexpr CommandId SetHolidaySchedule = 0x11; +static constexpr CommandId SetHolidayScheduleResponse = 0x11; +static constexpr CommandId GetHolidaySchedule = 0x12; +static constexpr CommandId GetHolidayScheduleResponse = 0x12; +static constexpr CommandId ClearHolidaySchedule = 0x13; +static constexpr CommandId ClearHolidayScheduleResponse = 0x13; +static constexpr CommandId SetUserType = 0x14; +static constexpr CommandId SetUserTypeResponse = 0x14; +static constexpr CommandId GetUserType = 0x15; +static constexpr CommandId GetUserTypeResponse = 0x15; +static constexpr CommandId SetRfid = 0x16; +static constexpr CommandId SetRfidResponse = 0x16; +static constexpr CommandId GetRfid = 0x17; +static constexpr CommandId GetRfidResponse = 0x17; +static constexpr CommandId ClearRfid = 0x18; +static constexpr CommandId ClearRfidResponse = 0x18; +static constexpr CommandId ClearAllRfids = 0x19; +static constexpr CommandId ClearAllRfidsResponse = 0x19; +static constexpr CommandId OperationEventNotification = 0x20; +static constexpr CommandId ProgrammingEventNotification = 0x21; +} // namespace Ids +} // namespace Commands +} // namespace DoorLock + +namespace WindowCovering { +namespace Commands { +namespace Ids { +static constexpr CommandId UpOrOpen = 0x00; +static constexpr CommandId DownOrClose = 0x01; +static constexpr CommandId StopMotion = 0x02; +static constexpr CommandId GoToLiftValue = 0x04; +static constexpr CommandId GoToLiftPercentage = 0x05; +static constexpr CommandId GoToTiltValue = 0x07; +static constexpr CommandId GoToTiltPercentage = 0x08; +} // namespace Ids +} // namespace Commands +} // namespace WindowCovering + +namespace BarrierControl { +namespace Commands { +namespace Ids { +static constexpr CommandId BarrierControlGoToPercent = 0x00; +static constexpr CommandId BarrierControlStop = 0x01; +} // namespace Ids +} // namespace Commands +} // namespace BarrierControl + +namespace Thermostat { +namespace Commands { +namespace Ids { +static constexpr CommandId SetpointRaiseLower = 0x00; +static constexpr CommandId CurrentWeeklySchedule = 0x00; +static constexpr CommandId SetWeeklySchedule = 0x01; +static constexpr CommandId RelayStatusLog = 0x01; +static constexpr CommandId GetWeeklySchedule = 0x02; +static constexpr CommandId ClearWeeklySchedule = 0x03; +static constexpr CommandId GetRelayStatusLog = 0x04; +} // namespace Ids +} // namespace Commands +} // namespace Thermostat + +namespace ColorControl { +namespace Commands { +namespace Ids { +static constexpr CommandId MoveToHue = 0x00; +static constexpr CommandId MoveHue = 0x01; +static constexpr CommandId StepHue = 0x02; +static constexpr CommandId MoveToSaturation = 0x03; +static constexpr CommandId MoveSaturation = 0x04; +static constexpr CommandId StepSaturation = 0x05; +static constexpr CommandId MoveToHueAndSaturation = 0x06; +static constexpr CommandId MoveToColor = 0x07; +static constexpr CommandId MoveColor = 0x08; +static constexpr CommandId StepColor = 0x09; +static constexpr CommandId MoveToColorTemperature = 0x0A; +static constexpr CommandId EnhancedMoveToHue = 0x40; +static constexpr CommandId EnhancedMoveHue = 0x41; +static constexpr CommandId EnhancedStepHue = 0x42; +static constexpr CommandId EnhancedMoveToHueAndSaturation = 0x43; +static constexpr CommandId ColorLoopSet = 0x44; +static constexpr CommandId StopMoveStep = 0x47; +static constexpr CommandId MoveColorTemperature = 0x4B; +static constexpr CommandId StepColorTemperature = 0x4C; +} // namespace Ids +} // namespace Commands +} // namespace ColorControl + +namespace IasZone { +namespace Commands { +namespace Ids { +static constexpr CommandId ZoneEnrollResponse = 0x00; +static constexpr CommandId ZoneStatusChangeNotification = 0x00; +static constexpr CommandId InitiateNormalOperationMode = 0x01; +static constexpr CommandId ZoneEnrollRequest = 0x01; +static constexpr CommandId InitiateTestMode = 0x02; +static constexpr CommandId InitiateNormalOperationModeResponse = 0x02; +static constexpr CommandId InitiateTestModeResponse = 0x03; +} // namespace Ids +} // namespace Commands +} // namespace IasZone + +namespace IasAce { +namespace Commands { +namespace Ids { +static constexpr CommandId Arm = 0x00; +static constexpr CommandId ArmResponse = 0x00; +static constexpr CommandId Bypass = 0x01; +static constexpr CommandId GetZoneIdMapResponse = 0x01; +static constexpr CommandId Emergency = 0x02; +static constexpr CommandId GetZoneInformationResponse = 0x02; +static constexpr CommandId Fire = 0x03; +static constexpr CommandId ZoneStatusChanged = 0x03; +static constexpr CommandId Panic = 0x04; +static constexpr CommandId PanelStatusChanged = 0x04; +static constexpr CommandId GetZoneIdMap = 0x05; +static constexpr CommandId GetPanelStatusResponse = 0x05; +static constexpr CommandId GetZoneInformation = 0x06; +static constexpr CommandId SetBypassedZoneList = 0x06; +static constexpr CommandId GetPanelStatus = 0x07; +static constexpr CommandId BypassResponse = 0x07; +static constexpr CommandId GetBypassedZoneList = 0x08; +static constexpr CommandId GetZoneStatusResponse = 0x08; +static constexpr CommandId GetZoneStatus = 0x09; +} // namespace Ids +} // namespace Commands +} // namespace IasAce + +namespace IasWd { +namespace Commands { +namespace Ids { +static constexpr CommandId StartWarning = 0x00; +static constexpr CommandId Squawk = 0x01; +} // namespace Ids +} // namespace Commands +} // namespace IasWd + +namespace TvChannel { +namespace Commands { +namespace Ids { +static constexpr CommandId ChangeChannel = 0x00; +static constexpr CommandId ChangeChannelResponse = 0x00; +static constexpr CommandId ChangeChannelByNumber = 0x01; +static constexpr CommandId SkipChannel = 0x02; +} // namespace Ids +} // namespace Commands +} // namespace TvChannel + +namespace TargetNavigator { +namespace Commands { +namespace Ids { +static constexpr CommandId NavigateTarget = 0x00; +static constexpr CommandId NavigateTargetResponse = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace TargetNavigator + +namespace MediaPlayback { +namespace Commands { +namespace Ids { +static constexpr CommandId MediaPlay = 0x00; +static constexpr CommandId MediaPlayResponse = 0x00; +static constexpr CommandId MediaPause = 0x01; +static constexpr CommandId MediaPauseResponse = 0x01; +static constexpr CommandId MediaStop = 0x02; +static constexpr CommandId MediaStopResponse = 0x02; +static constexpr CommandId MediaStartOver = 0x03; +static constexpr CommandId MediaStartOverResponse = 0x03; +static constexpr CommandId MediaPrevious = 0x04; +static constexpr CommandId MediaPreviousResponse = 0x04; +static constexpr CommandId MediaNext = 0x05; +static constexpr CommandId MediaNextResponse = 0x05; +static constexpr CommandId MediaRewind = 0x06; +static constexpr CommandId MediaRewindResponse = 0x06; +static constexpr CommandId MediaFastForward = 0x07; +static constexpr CommandId MediaFastForwardResponse = 0x07; +static constexpr CommandId MediaSkipForward = 0x08; +static constexpr CommandId MediaSkipForwardResponse = 0x08; +static constexpr CommandId MediaSkipBackward = 0x09; +static constexpr CommandId MediaSkipBackwardResponse = 0x09; +static constexpr CommandId MediaSkipSeek = 0x0A; +static constexpr CommandId MediaSkipSeekResponse = 0x0A; +} // namespace Ids +} // namespace Commands +} // namespace MediaPlayback + +namespace MediaInput { +namespace Commands { +namespace Ids { +static constexpr CommandId SelectInput = 0x00; +static constexpr CommandId ShowInputStatus = 0x01; +static constexpr CommandId HideInputStatus = 0x02; +static constexpr CommandId RenameInput = 0x03; +} // namespace Ids +} // namespace Commands +} // namespace MediaInput + +namespace LowPower { +namespace Commands { +namespace Ids { +static constexpr CommandId Sleep = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace LowPower + +namespace KeypadInput { +namespace Commands { +namespace Ids { +static constexpr CommandId SendKey = 0x00; +static constexpr CommandId SendKeyResponse = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace KeypadInput + +namespace ContentLauncher { +namespace Commands { +namespace Ids { +static constexpr CommandId LaunchContent = 0x00; +static constexpr CommandId LaunchContentResponse = 0x00; +static constexpr CommandId LaunchURL = 0x01; +static constexpr CommandId LaunchURLResponse = 0x01; +} // namespace Ids +} // namespace Commands +} // namespace ContentLauncher + +namespace AudioOutput { +namespace Commands { +namespace Ids { +static constexpr CommandId SelectOutput = 0x00; +static constexpr CommandId RenameOutput = 0x01; +} // namespace Ids +} // namespace Commands +} // namespace AudioOutput + +namespace ApplicationLauncher { +namespace Commands { +namespace Ids { +static constexpr CommandId LaunchApp = 0x00; +static constexpr CommandId LaunchAppResponse = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace ApplicationLauncher + +namespace ApplicationBasic { +namespace Commands { +namespace Ids { +static constexpr CommandId ChangeStatus = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace ApplicationBasic + +namespace AccountLogin { +namespace Commands { +namespace Ids { +static constexpr CommandId GetSetupPIN = 0x00; +static constexpr CommandId GetSetupPINResponse = 0x00; +static constexpr CommandId Login = 0x01; +} // namespace Ids +} // namespace Commands +} // namespace AccountLogin + +namespace TestCluster { +namespace Commands { +namespace Ids { +static constexpr CommandId Test = 0x00; +static constexpr CommandId TestSpecificResponse = 0x00; +static constexpr CommandId TestNotHandled = 0x01; +static constexpr CommandId TestSpecific = 0x02; +static constexpr CommandId TestUnknownCommand = 0x03; +} // namespace Ids +} // namespace Commands +} // namespace TestCluster + +namespace Messaging { +namespace Commands { +namespace Ids { +static constexpr CommandId DisplayMessage = 0x00; +static constexpr CommandId GetLastMessage = 0x00; +static constexpr CommandId CancelMessage = 0x01; +static constexpr CommandId MessageConfirmation = 0x01; +static constexpr CommandId DisplayProtectedMessage = 0x02; +static constexpr CommandId GetMessageCancellation = 0x02; +static constexpr CommandId CancelAllMessages = 0x03; +} // namespace Ids +} // namespace Commands +} // namespace Messaging + +namespace ApplianceEventsAndAlert { +namespace Commands { +namespace Ids { +static constexpr CommandId GetAlerts = 0x00; +static constexpr CommandId GetAlertsResponse = 0x00; +static constexpr CommandId AlertsNotification = 0x01; +static constexpr CommandId EventsNotification = 0x02; +} // namespace Ids +} // namespace Commands +} // namespace ApplianceEventsAndAlert + +namespace ApplianceStatistics { +namespace Commands { +namespace Ids { +static constexpr CommandId LogNotification = 0x00; +static constexpr CommandId LogRequest = 0x00; +static constexpr CommandId LogResponse = 0x01; +static constexpr CommandId LogQueueRequest = 0x01; +static constexpr CommandId LogQueueResponse = 0x02; +static constexpr CommandId StatisticsAvailable = 0x03; +} // namespace Ids +} // namespace Commands +} // namespace ApplianceStatistics + +namespace ElectricalMeasurement { +namespace Commands { +namespace Ids { +static constexpr CommandId GetProfileInfoResponseCommand = 0x00; +static constexpr CommandId GetProfileInfoCommand = 0x00; +static constexpr CommandId GetMeasurementProfileResponseCommand = 0x01; +static constexpr CommandId GetMeasurementProfileCommand = 0x01; +} // namespace Ids +} // namespace Commands +} // namespace ElectricalMeasurement + +namespace Binding { +namespace Commands { +namespace Ids { +static constexpr CommandId Bind = 0x00; +static constexpr CommandId Unbind = 0x01; +} // namespace Ids +} // namespace Commands +} // namespace Binding + +namespace SampleMfgSpecificCluster { +namespace Commands { +namespace Ids { +static constexpr CommandId CommandOne = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace SampleMfgSpecificCluster + +namespace SampleMfgSpecificCluster2 { +namespace Commands { +namespace Ids { +static constexpr CommandId CommandTwo = 0x00; +} // namespace Ids +} // namespace Commands +} // namespace SampleMfgSpecificCluster2 + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index 222185f437b6d4..448d002394ac69 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -64,6 +64,21 @@ "path": "../../zap-templates/templates/app/print-cluster.zapt", "name": "ZCL print-cluster header", "output": "src/app/common/gen/print-cluster.h" + }, + { + "path": "../../zap-templates/templates/app/ids/Attributes.zapt", + "name": "Attributes Ids header", + "output": "src/app/common/gen/ids/Attributes.h" + }, + { + "path": "../../zap-templates/templates/app/ids/Clusters.zapt", + "name": "Clusters Ids header", + "output": "src/app/common/gen/ids/Clusters.h" + }, + { + "path": "../../zap-templates/templates/app/ids/Commands.zapt", + "name": "Commands Ids header", + "output": "src/app/common/gen/ids/Commands.h" } ] } diff --git a/src/app/zap-templates/templates/app/encoder-src.zapt b/src/app/zap-templates/templates/app/encoder-src.zapt index aeaea2f74815e1..2ad82d98d1c066 100644 --- a/src/app/zap-templates/templates/app/encoder-src.zapt +++ b/src/app/zap-templates/templates/app/encoder-src.zapt @@ -7,10 +7,14 @@ #include #include +#include +#include +#include #include #include using namespace chip; +using namespace chip::app::Clusters; using namespace chip::System; using namespace chip::Encoding::LittleEndian; @@ -40,18 +44,6 @@ using namespace chip::Encoding::LittleEndian; #define EMBER_ZCL_REPORTING_DIRECTION_REPORTED 0x00 -{{#zcl_global_commands}} -#define ZCL_{{asDelimitedMacro label}}_COMMAND_ID ({{asHex code 2}}) -{{/zcl_global_commands}} - -{{#chip_client_clusters}} -#define {{define}}_ID {{asHex code 4}} -{{#chip_server_cluster_commands}} -#define ZCL_{{asDelimitedMacro name}}_COMMAND_ID ({{asHex code 2}}) -{{/chip_server_cluster_commands}} - -{{/chip_client_clusters}} - // TODO: Find a way to calculate maximum message length for clusters // https://github.com/project-chip/connectedhomeip/issues/965 constexpr uint16_t kMaxBufferSize = 1024; @@ -67,12 +59,12 @@ constexpr EndpointId kSourceEndpoint = 1; {{#chip_client_clusters}} {{> cluster_header}} -PacketBufferHandle encode{{asCamelCased name false}}ClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) +PacketBufferHandle encode{{asUpperCamelCase name}}ClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("Discover{{asCamelCased name false}}Attributes", {{define}}_ID); + COMMAND_HEADER("Discover{{asUpperCamelCase name}}Attributes", {{asUpperCamelCase name}}::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID) + .Put32(Globals::Commands::Ids::DiscoverAttributes) .Put32(0x0000) .Put8(0xFF); COMMAND_FOOTER(); @@ -80,41 +72,41 @@ PacketBufferHandle encode{{asCamelCased name false}}ClusterDiscoverAttributes(ui {{#chip_server_cluster_attributes}} /* - * Attribute {{asCamelCased name false}} + * Attribute {{asUpperCamelCase name}} */ -PacketBufferHandle encode{{asCamelCased parent.name false}}ClusterRead{{asCamelCased name false}}Attribute(uint8_t seqNum, EndpointId destinationEndpoint) +PacketBufferHandle encode{{asUpperCamelCase parent.name}}ClusterRead{{asUpperCamelCase name}}Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("Read{{asCamelCased parent.name false}}{{asCamelCased name false}}", {{parent.define}}_ID); + COMMAND_HEADER("Read{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}", {{asUpperCamelCase parent.name}}::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID) - .Put32({{asHex code 4}}); + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32({{#if (isGlobalAttribute)}}Globals{{else}}{{asUpperCamelCase parent.name}}{{/if}}::Attributes::Ids::{{asUpperCamelCase name}}); COMMAND_FOOTER(); } {{#if (isWritableAttribute)}} -PacketBufferHandle encode{{asCamelCased parent.name false}}ClusterWrite{{asCamelCased name false}}Attribute(uint8_t seqNum, EndpointId destinationEndpoint, {{chipType}} {{asCamelCased name}}) +PacketBufferHandle encode{{asUpperCamelCase parent.name}}ClusterWrite{{asUpperCamelCase name}}Attribute(uint8_t seqNum, EndpointId destinationEndpoint, {{chipType}} {{asLowerCamelCase name}}) { - COMMAND_HEADER("Write{{asCamelCased parent.name false}}{{asCamelCased name false}}", {{parent.define}}_ID); + COMMAND_HEADER("Write{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}", {{asUpperCamelCase parent.name}}::Id); {{#if (isString type)}} - size_t {{asCamelCased name}}StrLen = {{asCamelCased name}}.size(); - if (!CanCastTo<{{#if (isShortString type)}}uint8_t{{else}}uint16_t{{/if}}>({{asCamelCased name}}StrLen)) + size_t {{asLowerCamelCase name}}StrLen = {{asLowerCamelCase name}}.size(); + if (!CanCastTo<{{#if (isShortString type)}}uint8_t{{else}}uint16_t{{/if}}>({{asLowerCamelCase name}}StrLen)) { - ChipLogError(Zcl, "Error encoding %s command. String too long: %zu", kName, {{asCamelCased name}}StrLen); + ChipLogError(Zcl, "Error encoding %s command. String too long: %zu", kName, {{asLowerCamelCase name}}StrLen); return PacketBufferHandle(); } {{/if}} buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32({{asHex code 4}}) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32({{#if (isGlobalAttribute)}}Globals{{else}}{{asUpperCamelCase parent.name}}{{/if}}::Attributes::Ids::{{asUpperCamelCase name}}) .Put8({{atomicTypeId}}) {{#if (isString type)}} - .Put{{#if (isLongString type)}}16{{/if}}(static_cast<{{#if (isShortString type)}}uint8_t{{else}}uint16_t{{/if}}>({{asCamelCased name}}StrLen)) - .Put({{asCamelCased name}}.data(), {{asCamelCased name }}StrLen) + .Put{{#if (isLongString type)}}16{{/if}}(static_cast<{{#if (isShortString type)}}uint8_t{{else}}uint16_t{{/if}}>({{asLowerCamelCase name}}StrLen)) + .Put({{asLowerCamelCase name}}.data(), {{asLowerCamelCase name}}StrLen) {{else}} - .Put{{chipTypePutLength}}(static_cast<{{chipTypePutCastType}}>({{asCamelCased name}})) + .Put{{chipTypePutLength}}(static_cast<{{chipTypePutCastType}}>({{asLowerCamelCase name}})) {{/if}} ; COMMAND_FOOTER(); @@ -122,14 +114,14 @@ PacketBufferHandle encode{{asCamelCased parent.name false}}ClusterWrite{{asCamel {{/if}} {{#if (isReportableAttribute)}} -PacketBufferHandle encode{{asCamelCased parent.name false}}ClusterConfigure{{asCamelCased name false}}Attribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval{{#if isAnalog}}, {{chipType}} change{{/if}}) +PacketBufferHandle encode{{asUpperCamelCase parent.name}}ClusterConfigure{{asUpperCamelCase name}}Attribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval{{#if isAnalog}}, {{chipType}} change{{/if}}) { - COMMAND_HEADER("Report{{asCamelCased parent.name false}}{{asCamelCased name false}}", {{parent.define}}_ID); + COMMAND_HEADER("Report{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}", {{asUpperCamelCase parent.name}}::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32({{asHex code 4}}) + .Put32({{#if (isGlobalAttribute)}}Globals{{else}}{{asUpperCamelCase parent.name}}{{/if}}::Attributes::Ids::{{asUpperCamelCase name}}) .Put8({{atomicTypeId}}) .Put16(minInterval) .Put16(maxInterval); diff --git a/src/app/zap-templates/templates/app/ids/Attributes.zapt b/src/app/zap-templates/templates/app/ids/Attributes.zapt new file mode 100644 index 00000000000000..7fabae1fc786bc --- /dev/null +++ b/src/app/zap-templates/templates/app/ids/Attributes.zapt @@ -0,0 +1,47 @@ +{{> header}} + +#pragma once + +namespace chip { +namespace app { +namespace Clusters { + +namespace Globals { +namespace Attributes { +namespace Ids { +{{#zcl_attributes}} +{{#if (isServer side)}} +{{#unless clusterRef}} +static constexpr AttributeId {{asUpperCamelCase label}} = {{asHex code 4}}; +{{/unless}} +{{/if}} +{{/zcl_attributes}} +} // namespace Ids +} // namespace Attributes +} // namespace Globals + + +{{#zcl_clusters}} +{{#zcl_attributes_server}} +{{#if (hasSpecificAttributes)}} +{{#first}} +namespace {{asUpperCamelCase parent.label}} { +namespace Attributes { +namespace Ids { +{{/first}} +{{#if clusterRef}} +static constexpr AttributeId {{asUpperCamelCase label}} = {{asHex code 4}}; +{{/if}} +{{#last}} +} // namespace Ids +} // namespace Attributes +} // namespace {{asUpperCamelCase parent.label}} + +{{/last}} +{{/if}} +{{/zcl_attributes_server}} +{{/zcl_clusters}} + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/zap-templates/templates/app/ids/Clusters.zapt b/src/app/zap-templates/templates/app/ids/Clusters.zapt new file mode 100644 index 00000000000000..626ed129c249f5 --- /dev/null +++ b/src/app/zap-templates/templates/app/ids/Clusters.zapt @@ -0,0 +1,19 @@ +{{> header}} + +#pragma once + +#include + +namespace chip { +namespace app { +namespace Clusters { + +{{#zcl_clusters}} +namespace {{asUpperCamelCase label}} { +static constexpr ClusterId Id = {{asHex code 4}}; +} // namespace {{asUpperCamelCase label}} { +{{/zcl_clusters}} + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/zap-templates/templates/app/ids/Commands.zapt b/src/app/zap-templates/templates/app/ids/Commands.zapt new file mode 100644 index 00000000000000..9723326ff171e3 --- /dev/null +++ b/src/app/zap-templates/templates/app/ids/Commands.zapt @@ -0,0 +1,40 @@ +{{> header}} + +#pragma once + +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace Globals { +namespace Commands { +namespace Ids { +{{#zcl_global_commands}} +static constexpr CommandId {{asUpperCamelCase label}} = {{asHex code 2}}; +{{/zcl_global_commands}} +} // namespace Ids +} // namespace Commands +} // namespace Globals + +{{#zcl_clusters}} + +{{#zcl_commands}} +{{#first}} +namespace {{asCamelCased parent.label false}} { +namespace Commands { +namespace Ids { +{{/first}} +static constexpr CommandId {{asUpperCamelCase label}} = {{asHex code 2}}; +{{#last}} +} // namespace Ids +} // namespace Commands +} // namespace {{asCamelCased parent.label false}} +{{/last}} +{{/zcl_commands}} +{{/zcl_clusters}} + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js index 64fbf484946215..2672401bf89490 100644 --- a/src/app/zap-templates/templates/chip/helper.js +++ b/src/app/zap-templates/templates/chip/helper.js @@ -19,11 +19,14 @@ const zapPath = '../../../../../third_party/zap/repo/src-electron/'; const templateUtil = require(zapPath + 'generator/template-util.js') const zclHelper = require(zapPath + 'generator/helper-zcl.js') +const string = require(zapPath + 'util/string.js') const { Clusters, asBlocks, asPromise } = require('../../common/ClustersHelper.js'); const StringHelper = require('../../common/StringHelper.js'); const ChipTypesHelper = require('../../common/ChipTypesHelper.js'); +const kGlobalAttributes = [ 0xfffc, 0xfffd ]; + function throwErrorIfUndefined(item, errorMsg, conditions) { conditions.forEach(condition => { @@ -137,7 +140,7 @@ function chip_has_clusters(options) * for a given cluster. * * This function is meant to be used inside a {{#chip_server_clusters}} - * block. It will throws otherwise. + * block. It will throw otherwise. * * @param {*} options */ @@ -152,7 +155,7 @@ function chip_server_cluster_commands(options) * for a given command. * * This function is meant to be used inside a {{#chip_server_cluster_commands}} - * block. It will throws otherwise. + * block. It will throw otherwise. * * @param {*} options */ @@ -170,7 +173,7 @@ function chip_server_cluster_command_arguments(options) * Returns if a given cluster has any attributes of type List[T] * * This function is meant to be used inside a {{#chip_server_clusters}} - * block. It will throws otherwise. + * block. It will throw otherwise. * * @param {*} options */ @@ -186,7 +189,7 @@ function chip_has_list_attributes(options) * Returns if a given server cluster has any attributes of type List[T] * * This function is meant to be used inside a {{#chip_server_clusters}} - * block. It will throws otherwise. + * block. It will throw otherwise. * * @param {*} options */ @@ -202,7 +205,7 @@ function chip_server_has_list_attributes(options) * Returns if a given client cluster has any attributes of type List[T] * * This function is meant to be used inside a {{#chip_client_clusters}} - * block. It will throws otherwise. + * block. It will throw otherwise. * * @param {*} options */ @@ -219,7 +222,7 @@ function chip_client_has_list_attributes(options) * for a given cluster. * * This function is meant to be used inside a {{#chip_server_clusters}} - * block. It will throws otherwise. + * block. It will throw otherwise. * * @param {*} options */ @@ -229,11 +232,25 @@ function chip_server_cluster_attributes(options) return asBlocks.call(this, Clusters.getServerAttributes(clusterName), options); } +/** + * Returns whether a given attribute is global. + * + * This function is meant to be used inside a {{#chip_server_cluster_attributes}} block. + * It will throw otherwise. + * + * @param {*} options + */ +function isGlobalAttribute(options) +{ + checkIsInsideAttributeBlock(this, 'isGlobalAttribute'); + return kGlobalAttributes.includes(this.code); +} + /** * Returns if a given attribute is writable. * * This function is meant to be used inside a {{#chip_server_cluster_attributes}} block. - * It will throws otherwise. + * It will throw otherwise. * * @param {*} options */ @@ -247,7 +264,7 @@ function isWritableAttribute(options) * Returns if a given attribute is reportable. * * This function is meant to be used inside a {{#chip_server_cluster_attributes}} block. - * It will throws otherwise. + * It will throw otherwise. * * @param {*} options */ @@ -261,7 +278,7 @@ function isReportableAttribute(options) * Returns if a given command is manufacturer specific * * This function is meant to be used inside a {{#chip_server_cluster_commands}} block. - * It will throws otherwise. + * It will throw otherwise. * * @param {*} options */ @@ -354,6 +371,23 @@ function chip_attribute_list_entryTypes(options) return templateUtil.collectBlocks(this.items, options, this); } +function asLowerCamelCase(label) +{ + let str = string.toCamelCase(label, true); + return str.replace(/[\.:]/g, ''); +} + +function asUpperCamelCase(label) +{ + let str = string.toCamelCase(label, false); + return str.replace(/[\.:]/g, ''); +} + +function hasSpecificAttributes(options) +{ + return this.count > kGlobalAttributes.length; +} + // // Module exports // @@ -371,7 +405,11 @@ exports.chip_server_cluster_attributes = chip_server_cluster_attributes; exports.chip_has_list_attributes = chip_has_list_attributes; exports.chip_server_has_list_attributes = chip_server_has_list_attributes; exports.chip_client_has_list_attributes = chip_client_has_list_attributes; +exports.isGlobalAttribute = isGlobalAttribute; exports.isWritableAttribute = isWritableAttribute; exports.isReportableAttribute = isReportableAttribute; exports.isManufacturerSpecificCommand = isManufacturerSpecificCommand; exports.asCallbackAttributeType = asCallbackAttributeType; +exports.asLowerCamelCase = asLowerCamelCase; +exports.asUpperCamelCase = asUpperCamelCase; +exports.hasSpecificAttributes = hasSpecificAttributes; diff --git a/src/app/zap-templates/zcl/data-model/silabs/ha.xml b/src/app/zap-templates/zcl/data-model/silabs/ha.xml index d908475ef344da..fab7113b9d3bb1 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/ha.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/ha.xml @@ -2285,7 +2285,7 @@ limitations under the License. rms voltage phase c rms voltage min phase c rms voltage max phase c - rms current phase b + rms current phase c rms current min phase c rms current max phase c active power phase c diff --git a/src/app/zap-templates/zcl/data-model/silabs/sample-extensions.xml b/src/app/zap-templates/zcl/data-model/silabs/sample-extensions.xml index cc79035ba8d814..4ae12e578ac8c8 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/sample-extensions.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/sample-extensions.xml @@ -116,8 +116,8 @@ limitations under the License. SAMPLE_MFG_SPECIFIC_CLUSTER_2 true true - ember sample attribute 2 - ember sample attribute 2 + ember sample attribute 3 + ember sample attribute 4 A sample manufacturer specific command within the sample manufacturer specific diff --git a/src/controller/data_model/gen/encoder.cpp b/src/controller/data_model/gen/encoder.cpp index 7cf5d06b570dbd..8a545578f1ed44 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::Clusters; using namespace chip::System; using namespace chip::Encoding::LittleEndian; @@ -104,262 +108,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 FLOW_MEASUREMENT_CLUSTER_ID 0x0404 - -#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_PROVIDER_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 WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID 0x0036 - -#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; @@ -385,8 +133,8 @@ constexpr EndpointId kSourceEndpoint = 1; PacketBufferHandle encodeAccountLoginClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverAccountLoginAttributes", ACCOUNT_LOGIN_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverAccountLoginAttributes", AccountLogin::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -395,8 +143,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadAccountLoginClusterRevision", AccountLogin::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -419,8 +170,8 @@ PacketBufferHandle encodeAccountLoginClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeApplicationBasicClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverApplicationBasicAttributes", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverApplicationBasicAttributes", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -429,8 +180,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadApplicationBasicVendorName", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ApplicationBasic::Attributes::Ids::VendorName); COMMAND_FOOTER(); } @@ -439,8 +193,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadVendorNameAttribute(uint8_t */ PacketBufferHandle encodeApplicationBasicClusterReadVendorIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicVendorId", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadApplicationBasicVendorId", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ApplicationBasic::Attributes::Ids::VendorId); COMMAND_FOOTER(); } @@ -449,8 +206,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadApplicationBasicApplicationName", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ApplicationBasic::Attributes::Ids::ApplicationName); COMMAND_FOOTER(); } @@ -459,8 +219,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadApplicationNameAttribute(uin */ PacketBufferHandle encodeApplicationBasicClusterReadProductIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicProductId", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadApplicationBasicProductId", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ApplicationBasic::Attributes::Ids::ProductId); COMMAND_FOOTER(); } @@ -469,8 +232,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0005); + COMMAND_HEADER("ReadApplicationBasicApplicationId", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ApplicationBasic::Attributes::Ids::ApplicationId); COMMAND_FOOTER(); } @@ -479,8 +245,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadApplicationIdAttribute(uint8 */ PacketBufferHandle encodeApplicationBasicClusterReadCatalogVendorIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicCatalogVendorId", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0006); + COMMAND_HEADER("ReadApplicationBasicCatalogVendorId", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ApplicationBasic::Attributes::Ids::CatalogVendorId); COMMAND_FOOTER(); } @@ -489,8 +258,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadCatalogVendorIdAttribute(uin */ PacketBufferHandle encodeApplicationBasicClusterReadApplicationSatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicApplicationSatus", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0007); + COMMAND_HEADER("ReadApplicationBasicApplicationSatus", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ApplicationBasic::Attributes::Ids::ApplicationSatus); COMMAND_FOOTER(); } @@ -499,8 +271,11 @@ PacketBufferHandle encodeApplicationBasicClusterReadApplicationSatusAttribute(ui */ PacketBufferHandle encodeApplicationBasicClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationBasicClusterRevision", APPLICATION_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadApplicationBasicClusterRevision", ApplicationBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -517,8 +292,8 @@ PacketBufferHandle encodeApplicationBasicClusterReadClusterRevisionAttribute(uin PacketBufferHandle encodeApplicationLauncherClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverApplicationLauncherAttributes", APPLICATION_LAUNCHER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverApplicationLauncherAttributes", ApplicationLauncher::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -528,8 +303,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadApplicationLauncherApplicationLauncherList", ApplicationLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ApplicationLauncher::Attributes::Ids::ApplicationLauncherList); COMMAND_FOOTER(); } @@ -538,8 +316,11 @@ PacketBufferHandle encodeApplicationLauncherClusterReadApplicationLauncherListAt */ PacketBufferHandle encodeApplicationLauncherClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadApplicationLauncherClusterRevision", APPLICATION_LAUNCHER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadApplicationLauncherClusterRevision", ApplicationLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -557,8 +338,8 @@ PacketBufferHandle encodeApplicationLauncherClusterReadClusterRevisionAttribute( PacketBufferHandle encodeAudioOutputClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverAudioOutputAttributes", AUDIO_OUTPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverAudioOutputAttributes", AudioOutput::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -567,8 +348,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadAudioOutputAudioOutputList", AudioOutput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(AudioOutput::Attributes::Ids::AudioOutputList); COMMAND_FOOTER(); } @@ -577,8 +361,11 @@ PacketBufferHandle encodeAudioOutputClusterReadAudioOutputListAttribute(uint8_t */ PacketBufferHandle encodeAudioOutputClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadAudioOutputClusterRevision", AUDIO_OUTPUT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadAudioOutputClusterRevision", AudioOutput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -599,8 +386,8 @@ PacketBufferHandle encodeAudioOutputClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeBarrierControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverBarrierControlAttributes", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBarrierControlAttributes", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -609,8 +396,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadBarrierControlBarrierMovingState", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BarrierControl::Attributes::Ids::BarrierMovingState); COMMAND_FOOTER(); } @@ -619,8 +409,11 @@ PacketBufferHandle encodeBarrierControlClusterReadBarrierMovingStateAttribute(ui */ PacketBufferHandle encodeBarrierControlClusterReadBarrierSafetyStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBarrierControlBarrierSafetyStatus", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadBarrierControlBarrierSafetyStatus", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BarrierControl::Attributes::Ids::BarrierSafetyStatus); COMMAND_FOOTER(); } @@ -629,8 +422,11 @@ PacketBufferHandle encodeBarrierControlClusterReadBarrierSafetyStatusAttribute(u */ PacketBufferHandle encodeBarrierControlClusterReadBarrierCapabilitiesAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBarrierControlBarrierCapabilities", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadBarrierControlBarrierCapabilities", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BarrierControl::Attributes::Ids::BarrierCapabilities); COMMAND_FOOTER(); } @@ -639,8 +435,11 @@ PacketBufferHandle encodeBarrierControlClusterReadBarrierCapabilitiesAttribute(u */ PacketBufferHandle encodeBarrierControlClusterReadBarrierPositionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBarrierControlBarrierPosition", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000A); + COMMAND_HEADER("ReadBarrierControlBarrierPosition", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BarrierControl::Attributes::Ids::BarrierPosition); COMMAND_FOOTER(); } @@ -649,8 +448,11 @@ PacketBufferHandle encodeBarrierControlClusterReadBarrierPositionAttribute(uint8 */ PacketBufferHandle encodeBarrierControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBarrierControlClusterRevision", BARRIER_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadBarrierControlClusterRevision", BarrierControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -684,8 +486,8 @@ PacketBufferHandle encodeBarrierControlClusterReadClusterRevisionAttribute(uint8 PacketBufferHandle encodeBasicClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverBasicAttributes", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBasicAttributes", Basic::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -694,8 +496,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadBasicInteractionModelVersion", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::InteractionModelVersion); COMMAND_FOOTER(); } @@ -704,8 +509,11 @@ PacketBufferHandle encodeBasicClusterReadInteractionModelVersionAttribute(uint8_ */ PacketBufferHandle encodeBasicClusterReadVendorNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicVendorName", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadBasicVendorName", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::VendorName); COMMAND_FOOTER(); } @@ -714,8 +522,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadBasicVendorID", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::VendorID); COMMAND_FOOTER(); } @@ -724,8 +535,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadBasicProductName", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::ProductName); COMMAND_FOOTER(); } @@ -734,8 +548,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0004); + COMMAND_HEADER("ReadBasicProductID", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::ProductID); COMMAND_FOOTER(); } @@ -744,15 +561,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0005); + COMMAND_HEADER("ReadBasicUserLabel", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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)) { @@ -762,8 +582,8 @@ PacketBufferHandle encodeBasicClusterWriteUserLabelAttribute(uint8_t seqNum, End buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0005) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(Basic::Attributes::Ids::UserLabel) .Put8(66) .Put(static_cast(userLabelStrLen)) .Put(userLabel.data(), userLabelStrLen); @@ -775,14 +595,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0006); + COMMAND_HEADER("ReadBasicLocation", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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)) { @@ -792,8 +615,8 @@ PacketBufferHandle encodeBasicClusterWriteLocationAttribute(uint8_t seqNum, Endp buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0006) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(Basic::Attributes::Ids::Location) .Put8(66) .Put(static_cast(locationStrLen)) .Put(location.data(), locationStrLen); @@ -805,8 +628,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0007); + COMMAND_HEADER("ReadBasicHardwareVersion", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::HardwareVersion); COMMAND_FOOTER(); } @@ -815,8 +641,11 @@ PacketBufferHandle encodeBasicClusterReadHardwareVersionAttribute(uint8_t seqNum */ PacketBufferHandle encodeBasicClusterReadHardwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicHardwareVersionString", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0008); + COMMAND_HEADER("ReadBasicHardwareVersionString", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::HardwareVersionString); COMMAND_FOOTER(); } @@ -825,8 +654,11 @@ PacketBufferHandle encodeBasicClusterReadHardwareVersionStringAttribute(uint8_t */ PacketBufferHandle encodeBasicClusterReadSoftwareVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicSoftwareVersion", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0009); + COMMAND_HEADER("ReadBasicSoftwareVersion", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::SoftwareVersion); COMMAND_FOOTER(); } @@ -835,8 +667,11 @@ PacketBufferHandle encodeBasicClusterReadSoftwareVersionAttribute(uint8_t seqNum */ PacketBufferHandle encodeBasicClusterReadSoftwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicSoftwareVersionString", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000A); + COMMAND_HEADER("ReadBasicSoftwareVersionString", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::SoftwareVersionString); COMMAND_FOOTER(); } @@ -845,8 +680,11 @@ PacketBufferHandle encodeBasicClusterReadSoftwareVersionStringAttribute(uint8_t */ PacketBufferHandle encodeBasicClusterReadManufacturingDateAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicManufacturingDate", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000B); + COMMAND_HEADER("ReadBasicManufacturingDate", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::ManufacturingDate); COMMAND_FOOTER(); } @@ -855,8 +693,11 @@ PacketBufferHandle encodeBasicClusterReadManufacturingDateAttribute(uint8_t seqN */ PacketBufferHandle encodeBasicClusterReadPartNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicPartNumber", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000C); + COMMAND_HEADER("ReadBasicPartNumber", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::PartNumber); COMMAND_FOOTER(); } @@ -865,8 +706,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000D); + COMMAND_HEADER("ReadBasicProductURL", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::ProductURL); COMMAND_FOOTER(); } @@ -875,8 +719,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000E); + COMMAND_HEADER("ReadBasicProductLabel", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::ProductLabel); COMMAND_FOOTER(); } @@ -885,8 +732,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000F); + COMMAND_HEADER("ReadBasicSerialNumber", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::SerialNumber); COMMAND_FOOTER(); } @@ -895,19 +745,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0010); + COMMAND_HEADER("ReadBasicLocalConfigDisabled", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0010) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(Basic::Attributes::Ids::LocalConfigDisabled) .Put8(16) .Put8(static_cast(localConfigDisabled)); COMMAND_FOOTER(); @@ -918,8 +771,11 @@ PacketBufferHandle encodeBasicClusterWriteLocalConfigDisabledAttribute(uint8_t s */ PacketBufferHandle encodeBasicClusterReadReachableAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBasicReachable", BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0011); + COMMAND_HEADER("ReadBasicReachable", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Basic::Attributes::Ids::Reachable); COMMAND_FOOTER(); } @@ -928,8 +784,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadBasicClusterRevision", Basic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -947,8 +806,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBinaryInputBasicAttributes", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -957,19 +816,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0051); + COMMAND_HEADER("ReadBinaryInputBasicOutOfService", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0051) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(BinaryInputBasic::Attributes::Ids::OutOfService) .Put8(16) .Put8(static_cast(outOfService)); COMMAND_FOOTER(); @@ -980,19 +842,22 @@ PacketBufferHandle encodeBinaryInputBasicClusterWriteOutOfServiceAttribute(uint8 */ PacketBufferHandle encodeBinaryInputBasicClusterReadPresentValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBinaryInputBasicPresentValue", BINARY_INPUT_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0055); + COMMAND_HEADER("ReadBinaryInputBasicPresentValue", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0055) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(BinaryInputBasic::Attributes::Ids::PresentValue) .Put8(16) .Put8(static_cast(presentValue)); COMMAND_FOOTER(); @@ -1001,12 +866,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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0055) + .Put32(BinaryInputBasic::Attributes::Ids::PresentValue) .Put8(16) .Put16(minInterval) .Put16(maxInterval); @@ -1018,20 +883,23 @@ PacketBufferHandle encodeBinaryInputBasicClusterConfigurePresentValueAttribute(u */ PacketBufferHandle encodeBinaryInputBasicClusterReadStatusFlagsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBinaryInputBasicStatusFlags", BINARY_INPUT_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x006F); + COMMAND_HEADER("ReadBinaryInputBasicStatusFlags", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x006F) + .Put32(BinaryInputBasic::Attributes::Ids::StatusFlags) .Put8(24) .Put16(minInterval) .Put16(maxInterval); @@ -1043,8 +911,11 @@ PacketBufferHandle encodeBinaryInputBasicClusterConfigureStatusFlagsAttribute(ui */ PacketBufferHandle encodeBinaryInputBasicClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBinaryInputBasicClusterRevision", BINARY_INPUT_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadBinaryInputBasicClusterRevision", BinaryInputBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -1061,8 +932,8 @@ PacketBufferHandle encodeBinaryInputBasicClusterReadClusterRevisionAttribute(uin PacketBufferHandle encodeBindingClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverBindingAttributes", BINDING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBindingAttributes", Binding::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -1071,8 +942,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadBindingClusterRevision", Binding::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -1101,8 +975,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverBridgedDeviceBasicAttributes", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -1111,8 +985,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadBridgedDeviceBasicVendorName", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::VendorName); COMMAND_FOOTER(); } @@ -1121,8 +998,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorNameAttribute(uint8_ */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadVendorIDAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicVendorID", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadBridgedDeviceBasicVendorID", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::VendorID); COMMAND_FOOTER(); } @@ -1131,8 +1011,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadBridgedDeviceBasicProductName", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::ProductName); COMMAND_FOOTER(); } @@ -1141,15 +1024,18 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductNameAttribute(uint8 */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadUserLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicUserLabel", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0005); + COMMAND_HEADER("ReadBridgedDeviceBasicUserLabel", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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)) { @@ -1159,8 +1045,8 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterWriteUserLabelAttribute(uint8_ buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0005) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::UserLabel) .Put8(66) .Put(static_cast(userLabelStrLen)) .Put(userLabel.data(), userLabelStrLen); @@ -1172,8 +1058,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterWriteUserLabelAttribute(uint8_ */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersion", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0007); + COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersion", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::HardwareVersion); COMMAND_FOOTER(); } @@ -1182,8 +1071,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionAttribute(u */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersionString", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0008); + COMMAND_HEADER("ReadBridgedDeviceBasicHardwareVersionString", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::HardwareVersionString); COMMAND_FOOTER(); } @@ -1192,8 +1084,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadHardwareVersionStringAttri */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersion", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0009); + COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersion", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::SoftwareVersion); COMMAND_FOOTER(); } @@ -1202,8 +1097,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionAttribute(u */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersionString", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000A); + COMMAND_HEADER("ReadBridgedDeviceBasicSoftwareVersionString", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::SoftwareVersionString); COMMAND_FOOTER(); } @@ -1212,8 +1110,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSoftwareVersionStringAttri */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadManufacturingDateAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicManufacturingDate", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000B); + COMMAND_HEADER("ReadBridgedDeviceBasicManufacturingDate", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::ManufacturingDate); COMMAND_FOOTER(); } @@ -1222,8 +1123,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadManufacturingDateAttribute */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadPartNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicPartNumber", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000C); + COMMAND_HEADER("ReadBridgedDeviceBasicPartNumber", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::PartNumber); COMMAND_FOOTER(); } @@ -1232,8 +1136,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadPartNumberAttribute(uint8_ */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductURLAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicProductURL", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000D); + COMMAND_HEADER("ReadBridgedDeviceBasicProductURL", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::ProductURL); COMMAND_FOOTER(); } @@ -1242,8 +1149,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductURLAttribute(uint8_ */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductLabelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicProductLabel", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000E); + COMMAND_HEADER("ReadBridgedDeviceBasicProductLabel", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::ProductLabel); COMMAND_FOOTER(); } @@ -1252,8 +1162,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadProductLabelAttribute(uint */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSerialNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicSerialNumber", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000F); + COMMAND_HEADER("ReadBridgedDeviceBasicSerialNumber", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::SerialNumber); COMMAND_FOOTER(); } @@ -1262,8 +1175,11 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadSerialNumberAttribute(uint */ PacketBufferHandle encodeBridgedDeviceBasicClusterReadReachableAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadBridgedDeviceBasicReachable", BRIDGED_DEVICE_BASIC_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0011); + COMMAND_HEADER("ReadBridgedDeviceBasicReachable", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(BridgedDeviceBasic::Attributes::Ids::Reachable); COMMAND_FOOTER(); } @@ -1272,8 +1188,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadBridgedDeviceBasicClusterRevision", BridgedDeviceBasic::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -1352,8 +1271,8 @@ PacketBufferHandle encodeBridgedDeviceBasicClusterReadClusterRevisionAttribute(u PacketBufferHandle encodeColorControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverColorControlAttributes", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverColorControlAttributes", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -1362,20 +1281,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadColorControlCurrentHue", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(ColorControl::Attributes::Ids::CurrentHue) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -1388,8 +1310,11 @@ PacketBufferHandle encodeColorControlClusterConfigureCurrentHueAttribute(uint8_t */ PacketBufferHandle encodeColorControlClusterReadCurrentSaturationAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlCurrentSaturation", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadColorControlCurrentSaturation", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::CurrentSaturation); COMMAND_FOOTER(); } @@ -1397,12 +1322,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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0001) + .Put32(ColorControl::Attributes::Ids::CurrentSaturation) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -1415,8 +1340,11 @@ PacketBufferHandle encodeColorControlClusterConfigureCurrentSaturationAttribute( */ PacketBufferHandle encodeColorControlClusterReadRemainingTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlRemainingTime", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadColorControlRemainingTime", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::RemainingTime); COMMAND_FOOTER(); } @@ -1425,20 +1353,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadColorControlCurrentX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0003) + .Put32(ColorControl::Attributes::Ids::CurrentX) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -1451,20 +1382,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0004); + COMMAND_HEADER("ReadColorControlCurrentY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0004) + .Put32(ColorControl::Attributes::Ids::CurrentY) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -1477,8 +1411,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0005); + COMMAND_HEADER("ReadColorControlDriftCompensation", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::DriftCompensation); COMMAND_FOOTER(); } @@ -1487,8 +1424,11 @@ PacketBufferHandle encodeColorControlClusterReadDriftCompensationAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadCompensationTextAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlCompensationText", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0006); + COMMAND_HEADER("ReadColorControlCompensationText", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::CompensationText); COMMAND_FOOTER(); } @@ -1497,8 +1437,11 @@ PacketBufferHandle encodeColorControlClusterReadCompensationTextAttribute(uint8_ */ PacketBufferHandle encodeColorControlClusterReadColorTemperatureAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorTemperature", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0007); + COMMAND_HEADER("ReadColorControlColorTemperature", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::ColorTemperature); COMMAND_FOOTER(); } @@ -1506,12 +1449,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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0007) + .Put32(ColorControl::Attributes::Ids::ColorTemperature) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -1524,8 +1467,11 @@ PacketBufferHandle encodeColorControlClusterConfigureColorTemperatureAttribute(u */ PacketBufferHandle encodeColorControlClusterReadColorModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorMode", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0008); + COMMAND_HEADER("ReadColorControlColorMode", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::ColorMode); COMMAND_FOOTER(); } @@ -1534,19 +1480,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000F); + COMMAND_HEADER("ReadColorControlColorControlOptions", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x000F) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorControlOptions) .Put8(24) .Put8(static_cast(colorControlOptions)); COMMAND_FOOTER(); @@ -1557,8 +1506,11 @@ PacketBufferHandle encodeColorControlClusterWriteColorControlOptionsAttribute(ui */ PacketBufferHandle encodeColorControlClusterReadNumberOfPrimariesAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlNumberOfPrimaries", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0010); + COMMAND_HEADER("ReadColorControlNumberOfPrimaries", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::NumberOfPrimaries); COMMAND_FOOTER(); } @@ -1567,8 +1519,11 @@ PacketBufferHandle encodeColorControlClusterReadNumberOfPrimariesAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary1XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary1X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0011); + COMMAND_HEADER("ReadColorControlPrimary1X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary1X); COMMAND_FOOTER(); } @@ -1577,8 +1532,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0012); + COMMAND_HEADER("ReadColorControlPrimary1Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary1Y); COMMAND_FOOTER(); } @@ -1587,8 +1545,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0013); + COMMAND_HEADER("ReadColorControlPrimary1Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary1Intensity); COMMAND_FOOTER(); } @@ -1597,8 +1558,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary1IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary2XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary2X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0015); + COMMAND_HEADER("ReadColorControlPrimary2X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary2X); COMMAND_FOOTER(); } @@ -1607,8 +1571,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0016); + COMMAND_HEADER("ReadColorControlPrimary2Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary2Y); COMMAND_FOOTER(); } @@ -1617,8 +1584,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0017); + COMMAND_HEADER("ReadColorControlPrimary2Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary2Intensity); COMMAND_FOOTER(); } @@ -1627,8 +1597,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary2IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary3XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary3X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0019); + COMMAND_HEADER("ReadColorControlPrimary3X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary3X); COMMAND_FOOTER(); } @@ -1637,8 +1610,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001A); + COMMAND_HEADER("ReadColorControlPrimary3Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary3Y); COMMAND_FOOTER(); } @@ -1647,8 +1623,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001B); + COMMAND_HEADER("ReadColorControlPrimary3Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary3Intensity); COMMAND_FOOTER(); } @@ -1657,8 +1636,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary3IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary4XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary4X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0020); + COMMAND_HEADER("ReadColorControlPrimary4X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary4X); COMMAND_FOOTER(); } @@ -1667,8 +1649,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0021); + COMMAND_HEADER("ReadColorControlPrimary4Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary4Y); COMMAND_FOOTER(); } @@ -1677,8 +1662,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0022); + COMMAND_HEADER("ReadColorControlPrimary4Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary4Intensity); COMMAND_FOOTER(); } @@ -1687,8 +1675,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary4IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary5XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary5X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0024); + COMMAND_HEADER("ReadColorControlPrimary5X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary5X); COMMAND_FOOTER(); } @@ -1697,8 +1688,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0025); + COMMAND_HEADER("ReadColorControlPrimary5Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary5Y); COMMAND_FOOTER(); } @@ -1707,8 +1701,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0026); + COMMAND_HEADER("ReadColorControlPrimary5Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary5Intensity); COMMAND_FOOTER(); } @@ -1717,8 +1714,11 @@ PacketBufferHandle encodeColorControlClusterReadPrimary5IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadPrimary6XAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlPrimary6X", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0028); + COMMAND_HEADER("ReadColorControlPrimary6X", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary6X); COMMAND_FOOTER(); } @@ -1727,8 +1727,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0029); + COMMAND_HEADER("ReadColorControlPrimary6Y", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary6Y); COMMAND_FOOTER(); } @@ -1737,8 +1740,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x002A); + COMMAND_HEADER("ReadColorControlPrimary6Intensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::Primary6Intensity); COMMAND_FOOTER(); } @@ -1747,19 +1753,22 @@ PacketBufferHandle encodeColorControlClusterReadPrimary6IntensityAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadWhitePointXAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlWhitePointX", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0030); + COMMAND_HEADER("ReadColorControlWhitePointX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0030) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::WhitePointX) .Put8(33) .Put16(static_cast(whitePointX)); COMMAND_FOOTER(); @@ -1770,19 +1779,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0031); + COMMAND_HEADER("ReadColorControlWhitePointY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0031) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::WhitePointY) .Put8(33) .Put16(static_cast(whitePointY)); COMMAND_FOOTER(); @@ -1793,19 +1805,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0032); + COMMAND_HEADER("ReadColorControlColorPointRX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0032) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorPointRX) .Put8(33) .Put16(static_cast(colorPointRX)); COMMAND_FOOTER(); @@ -1816,19 +1831,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0033); + COMMAND_HEADER("ReadColorControlColorPointRY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0033) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorPointRY) .Put8(33) .Put16(static_cast(colorPointRY)); COMMAND_FOOTER(); @@ -1839,19 +1857,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0034); + COMMAND_HEADER("ReadColorControlColorPointRIntensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0034) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorPointRIntensity) .Put8(32) .Put8(static_cast(colorPointRIntensity)); COMMAND_FOOTER(); @@ -1862,19 +1883,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointRIntensityAttribute(u */ PacketBufferHandle encodeColorControlClusterReadColorPointGXAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointGX", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0036); + COMMAND_HEADER("ReadColorControlColorPointGX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0036) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorPointGX) .Put8(33) .Put16(static_cast(colorPointGX)); COMMAND_FOOTER(); @@ -1885,19 +1909,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0037); + COMMAND_HEADER("ReadColorControlColorPointGY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0037) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorPointGY) .Put8(33) .Put16(static_cast(colorPointGY)); COMMAND_FOOTER(); @@ -1908,19 +1935,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0038); + COMMAND_HEADER("ReadColorControlColorPointGIntensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0038) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorPointGIntensity) .Put8(32) .Put8(static_cast(colorPointGIntensity)); COMMAND_FOOTER(); @@ -1931,19 +1961,22 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointGIntensityAttribute(u */ PacketBufferHandle encodeColorControlClusterReadColorPointBXAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorPointBX", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x003A); + COMMAND_HEADER("ReadColorControlColorPointBX", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x003A) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorPointBX) .Put8(33) .Put16(static_cast(colorPointBX)); COMMAND_FOOTER(); @@ -1954,19 +1987,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x003B); + COMMAND_HEADER("ReadColorControlColorPointBY", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x003B) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorPointBY) .Put8(33) .Put16(static_cast(colorPointBY)); COMMAND_FOOTER(); @@ -1977,19 +2013,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x003C); + COMMAND_HEADER("ReadColorControlColorPointBIntensity", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x003C) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::ColorPointBIntensity) .Put8(32) .Put8(static_cast(colorPointBIntensity)); COMMAND_FOOTER(); @@ -2000,8 +2039,11 @@ PacketBufferHandle encodeColorControlClusterWriteColorPointBIntensityAttribute(u */ PacketBufferHandle encodeColorControlClusterReadEnhancedCurrentHueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlEnhancedCurrentHue", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4000); + COMMAND_HEADER("ReadColorControlEnhancedCurrentHue", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::EnhancedCurrentHue); COMMAND_FOOTER(); } @@ -2010,8 +2052,11 @@ PacketBufferHandle encodeColorControlClusterReadEnhancedCurrentHueAttribute(uint */ PacketBufferHandle encodeColorControlClusterReadEnhancedColorModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlEnhancedColorMode", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4001); + COMMAND_HEADER("ReadColorControlEnhancedColorMode", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::EnhancedColorMode); COMMAND_FOOTER(); } @@ -2020,8 +2065,11 @@ PacketBufferHandle encodeColorControlClusterReadEnhancedColorModeAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadColorLoopActiveAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorLoopActive", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4002); + COMMAND_HEADER("ReadColorControlColorLoopActive", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::ColorLoopActive); COMMAND_FOOTER(); } @@ -2030,8 +2078,11 @@ PacketBufferHandle encodeColorControlClusterReadColorLoopActiveAttribute(uint8_t */ PacketBufferHandle encodeColorControlClusterReadColorLoopDirectionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorLoopDirection", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4003); + COMMAND_HEADER("ReadColorControlColorLoopDirection", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::ColorLoopDirection); COMMAND_FOOTER(); } @@ -2040,8 +2091,11 @@ PacketBufferHandle encodeColorControlClusterReadColorLoopDirectionAttribute(uint */ PacketBufferHandle encodeColorControlClusterReadColorLoopTimeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorLoopTime", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4004); + COMMAND_HEADER("ReadColorControlColorLoopTime", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::ColorLoopTime); COMMAND_FOOTER(); } @@ -2050,8 +2104,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x400A); + COMMAND_HEADER("ReadColorControlColorCapabilities", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::ColorCapabilities); COMMAND_FOOTER(); } @@ -2060,8 +2117,11 @@ PacketBufferHandle encodeColorControlClusterReadColorCapabilitiesAttribute(uint8 */ PacketBufferHandle encodeColorControlClusterReadColorTempPhysicalMinAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorTempPhysicalMin", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x400B); + COMMAND_HEADER("ReadColorControlColorTempPhysicalMin", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::ColorTempPhysicalMin); COMMAND_FOOTER(); } @@ -2070,8 +2130,11 @@ PacketBufferHandle encodeColorControlClusterReadColorTempPhysicalMinAttribute(ui */ PacketBufferHandle encodeColorControlClusterReadColorTempPhysicalMaxAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlColorTempPhysicalMax", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x400C); + COMMAND_HEADER("ReadColorControlColorTempPhysicalMax", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::ColorTempPhysicalMax); COMMAND_FOOTER(); } @@ -2081,8 +2144,11 @@ PacketBufferHandle encodeColorControlClusterReadColorTempPhysicalMaxAttribute(ui PacketBufferHandle encodeColorControlClusterReadCoupleColorTempToLevelMinMiredsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlCoupleColorTempToLevelMinMireds", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x400D); + COMMAND_HEADER("ReadColorControlCoupleColorTempToLevelMinMireds", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::CoupleColorTempToLevelMinMireds); COMMAND_FOOTER(); } @@ -2092,8 +2158,11 @@ PacketBufferHandle encodeColorControlClusterReadCoupleColorTempToLevelMinMiredsA PacketBufferHandle encodeColorControlClusterReadStartUpColorTemperatureMiredsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlStartUpColorTemperatureMireds", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4010); + COMMAND_HEADER("ReadColorControlStartUpColorTemperatureMireds", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ColorControl::Attributes::Ids::StartUpColorTemperatureMireds); COMMAND_FOOTER(); } @@ -2101,11 +2170,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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x4010) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(ColorControl::Attributes::Ids::StartUpColorTemperatureMireds) .Put8(33) .Put16(static_cast(startUpColorTemperatureMireds)); COMMAND_FOOTER(); @@ -2116,8 +2185,11 @@ PacketBufferHandle encodeColorControlClusterWriteStartUpColorTemperatureMiredsAt */ PacketBufferHandle encodeColorControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadColorControlClusterRevision", COLOR_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadColorControlClusterRevision", ColorControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2136,8 +2208,8 @@ PacketBufferHandle encodeColorControlClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeContentLauncherClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverContentLauncherAttributes", CONTENT_LAUNCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverContentLauncherAttributes", ContentLauncher::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2146,8 +2218,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadContentLauncherAcceptsHeaderList", ContentLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ContentLauncher::Attributes::Ids::AcceptsHeaderList); COMMAND_FOOTER(); } @@ -2156,8 +2231,11 @@ PacketBufferHandle encodeContentLauncherClusterReadAcceptsHeaderListAttribute(ui */ PacketBufferHandle encodeContentLauncherClusterReadSupportedStreamingTypesAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadContentLauncherSupportedStreamingTypes", CONTENT_LAUNCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadContentLauncherSupportedStreamingTypes", ContentLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ContentLauncher::Attributes::Ids::SupportedStreamingTypes); COMMAND_FOOTER(); } @@ -2166,8 +2244,11 @@ PacketBufferHandle encodeContentLauncherClusterReadSupportedStreamingTypesAttrib */ PacketBufferHandle encodeContentLauncherClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadContentLauncherClusterRevision", CONTENT_LAUNCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadContentLauncherClusterRevision", ContentLauncher::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2186,8 +2267,8 @@ PacketBufferHandle encodeContentLauncherClusterReadClusterRevisionAttribute(uint PacketBufferHandle encodeDescriptorClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverDescriptorAttributes", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverDescriptorAttributes", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2196,8 +2277,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadDescriptorDeviceList", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Descriptor::Attributes::Ids::DeviceList); COMMAND_FOOTER(); } @@ -2206,8 +2290,11 @@ PacketBufferHandle encodeDescriptorClusterReadDeviceListAttribute(uint8_t seqNum */ PacketBufferHandle encodeDescriptorClusterReadServerListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDescriptorServerList", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadDescriptorServerList", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Descriptor::Attributes::Ids::ServerList); COMMAND_FOOTER(); } @@ -2216,8 +2303,11 @@ PacketBufferHandle encodeDescriptorClusterReadServerListAttribute(uint8_t seqNum */ PacketBufferHandle encodeDescriptorClusterReadClientListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDescriptorClientList", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadDescriptorClientList", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Descriptor::Attributes::Ids::ClientList); COMMAND_FOOTER(); } @@ -2226,8 +2316,11 @@ PacketBufferHandle encodeDescriptorClusterReadClientListAttribute(uint8_t seqNum */ PacketBufferHandle encodeDescriptorClusterReadPartsListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDescriptorPartsList", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadDescriptorPartsList", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Descriptor::Attributes::Ids::PartsList); COMMAND_FOOTER(); } @@ -2236,8 +2329,11 @@ PacketBufferHandle encodeDescriptorClusterReadPartsListAttribute(uint8_t seqNum, */ PacketBufferHandle encodeDescriptorClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadDescriptorClusterRevision", DESCRIPTOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadDescriptorClusterRevision", Descriptor::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2252,8 +2348,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverDiagnosticLogsAttributes", DiagnosticLogs::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2294,8 +2390,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverDoorLockAttributes", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2304,20 +2400,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadDoorLockLockState", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(DoorLock::Attributes::Ids::LockState) .Put8(48) .Put16(minInterval) .Put16(maxInterval); @@ -2329,8 +2428,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadDoorLockLockType", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(DoorLock::Attributes::Ids::LockType); COMMAND_FOOTER(); } @@ -2339,8 +2441,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadDoorLockActuatorEnabled", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(DoorLock::Attributes::Ids::ActuatorEnabled); COMMAND_FOOTER(); } @@ -2349,8 +2454,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadDoorLockClusterRevision", DoorLock::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2371,8 +2479,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverEthernetNetworkDiagnosticsAttributes", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2381,8 +2489,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterDiscoverAttributes(uin */ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadPacketRxCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsPacketRxCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsPacketRxCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(EthernetNetworkDiagnostics::Attributes::Ids::PacketRxCount); COMMAND_FOOTER(); } @@ -2391,8 +2502,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadPacketRxCountAttri */ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadPacketTxCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsPacketTxCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsPacketTxCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(EthernetNetworkDiagnostics::Attributes::Ids::PacketTxCount); COMMAND_FOOTER(); } @@ -2401,8 +2515,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadPacketTxCountAttri */ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadTxErrCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsTxErrCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0004); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsTxErrCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(EthernetNetworkDiagnostics::Attributes::Ids::TxErrCount); COMMAND_FOOTER(); } @@ -2412,8 +2529,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadTxErrCountAttribut PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadCollisionCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsCollisionCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0005); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsCollisionCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(EthernetNetworkDiagnostics::Attributes::Ids::CollisionCount); COMMAND_FOOTER(); } @@ -2422,8 +2542,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadCollisionCountAttr */ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadOverrunCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsOverrunCount", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0006); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsOverrunCount", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(EthernetNetworkDiagnostics::Attributes::Ids::OverrunCount); COMMAND_FOOTER(); } @@ -2433,8 +2556,11 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadOverrunCountAttrib PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadEthernetNetworkDiagnosticsClusterRevision", ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadEthernetNetworkDiagnosticsClusterRevision", EthernetNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2450,8 +2576,8 @@ PacketBufferHandle encodeEthernetNetworkDiagnosticsClusterReadClusterRevisionAtt PacketBufferHandle encodeFixedLabelClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverFixedLabelAttributes", FIXED_LABEL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverFixedLabelAttributes", FixedLabel::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2460,8 +2586,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadFixedLabelLabelList", FixedLabel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(FixedLabel::Attributes::Ids::LabelList); COMMAND_FOOTER(); } @@ -2470,9 +2599,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); - COMMAND_FOOTER(); + COMMAND_HEADER("ReadFixedLabelClusterRevision", FixedLabel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); + COMMAND_FOOTER(); } /*----------------------------------------------------------------------------*\ @@ -2489,8 +2621,8 @@ PacketBufferHandle encodeFixedLabelClusterReadClusterRevisionAttribute(uint8_t s PacketBufferHandle encodeFlowMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverFlowMeasurementAttributes", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverFlowMeasurementAttributes", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2499,8 +2631,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadFlowMeasurementMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(FlowMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -2509,8 +2644,11 @@ PacketBufferHandle encodeFlowMeasurementClusterReadMeasuredValueAttribute(uint8_ */ PacketBufferHandle encodeFlowMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementMinMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadFlowMeasurementMinMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(FlowMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -2519,8 +2657,11 @@ PacketBufferHandle encodeFlowMeasurementClusterReadMinMeasuredValueAttribute(uin */ PacketBufferHandle encodeFlowMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementMaxMeasuredValue", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadFlowMeasurementMaxMeasuredValue", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(FlowMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -2529,8 +2670,11 @@ PacketBufferHandle encodeFlowMeasurementClusterReadMaxMeasuredValueAttribute(uin */ PacketBufferHandle encodeFlowMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadFlowMeasurementClusterRevision", FLOW_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadFlowMeasurementClusterRevision", FlowMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2550,8 +2694,8 @@ PacketBufferHandle encodeFlowMeasurementClusterReadClusterRevisionAttribute(uint PacketBufferHandle encodeGeneralCommissioningClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverGeneralCommissioningAttributes", GENERAL_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverGeneralCommissioningAttributes", GeneralCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2560,8 +2704,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadGeneralCommissioningFabricId", GeneralCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(GeneralCommissioning::Attributes::Ids::FabricId); COMMAND_FOOTER(); } @@ -2570,19 +2717,22 @@ PacketBufferHandle encodeGeneralCommissioningClusterReadFabricIdAttribute(uint8_ */ PacketBufferHandle encodeGeneralCommissioningClusterReadBreadcrumbAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralCommissioningBreadcrumb", GENERAL_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadGeneralCommissioningBreadcrumb", GeneralCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0001) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(GeneralCommissioning::Attributes::Ids::Breadcrumb) .Put8(39) .Put64(static_cast(breadcrumb)); COMMAND_FOOTER(); @@ -2593,8 +2743,11 @@ PacketBufferHandle encodeGeneralCommissioningClusterWriteBreadcrumbAttribute(uin */ PacketBufferHandle encodeGeneralCommissioningClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralCommissioningClusterRevision", GENERAL_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadGeneralCommissioningClusterRevision", GeneralCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2611,8 +2764,8 @@ PacketBufferHandle encodeGeneralCommissioningClusterReadClusterRevisionAttribute PacketBufferHandle encodeGeneralDiagnosticsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverGeneralDiagnosticsAttributes", GENERAL_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverGeneralDiagnosticsAttributes", GeneralDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2621,8 +2774,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadGeneralDiagnosticsNetworkInterfaces", GeneralDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(GeneralDiagnostics::Attributes::Ids::NetworkInterfaces); COMMAND_FOOTER(); } @@ -2631,8 +2787,11 @@ PacketBufferHandle encodeGeneralDiagnosticsClusterReadNetworkInterfacesAttribute */ PacketBufferHandle encodeGeneralDiagnosticsClusterReadRebootCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralDiagnosticsRebootCount", GENERAL_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadGeneralDiagnosticsRebootCount", GeneralDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(GeneralDiagnostics::Attributes::Ids::RebootCount); COMMAND_FOOTER(); } @@ -2641,8 +2800,11 @@ PacketBufferHandle encodeGeneralDiagnosticsClusterReadRebootCountAttribute(uint8 */ PacketBufferHandle encodeGeneralDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadGeneralDiagnosticsClusterRevision", GENERAL_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadGeneralDiagnosticsClusterRevision", GeneralDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2659,8 +2821,8 @@ PacketBufferHandle encodeGeneralDiagnosticsClusterReadClusterRevisionAttribute(u PacketBufferHandle encodeGroupKeyManagementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverGroupKeyManagementAttributes", GROUP_KEY_MANAGEMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverGroupKeyManagementAttributes", GroupKeyManagement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2669,8 +2831,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadGroupKeyManagementGroups", GroupKeyManagement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(GroupKeyManagement::Attributes::Ids::Groups); COMMAND_FOOTER(); } @@ -2679,8 +2844,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadGroupKeyManagementGroupKeys", GroupKeyManagement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(GroupKeyManagement::Attributes::Ids::GroupKeys); COMMAND_FOOTER(); } @@ -2689,8 +2857,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadGroupKeyManagementClusterRevision", GroupKeyManagement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2712,8 +2883,8 @@ PacketBufferHandle encodeGroupKeyManagementClusterReadClusterRevisionAttribute(u PacketBufferHandle encodeGroupsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverGroupsAttributes", GROUPS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverGroupsAttributes", Groups::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2722,8 +2893,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadGroupsNameSupport", Groups::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Groups::Attributes::Ids::NameSupport); COMMAND_FOOTER(); } @@ -2732,8 +2906,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadGroupsClusterRevision", Groups::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2751,8 +2928,8 @@ PacketBufferHandle encodeGroupsClusterReadClusterRevisionAttribute(uint8_t seqNu PacketBufferHandle encodeIdentifyClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverIdentifyAttributes", IDENTIFY_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverIdentifyAttributes", Identify::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2761,19 +2938,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadIdentifyIdentifyTime", Identify::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0000) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(Identify::Attributes::Ids::IdentifyTime) .Put8(33) .Put16(static_cast(identifyTime)); COMMAND_FOOTER(); @@ -2784,8 +2964,11 @@ PacketBufferHandle encodeIdentifyClusterWriteIdentifyTimeAttribute(uint8_t seqNu */ PacketBufferHandle encodeIdentifyClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadIdentifyClusterRevision", IDENTIFY_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadIdentifyClusterRevision", Identify::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2801,8 +2984,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverKeypadInputAttributes", KeypadInput::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2811,8 +2994,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadKeypadInputClusterRevision", KeypadInput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2836,8 +3022,8 @@ PacketBufferHandle encodeKeypadInputClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeLevelControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverLevelControlAttributes", LEVEL_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverLevelControlAttributes", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2846,8 +3032,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadLevelControlCurrentLevel", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(LevelControl::Attributes::Ids::CurrentLevel); COMMAND_FOOTER(); } @@ -2855,12 +3044,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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(LevelControl::Attributes::Ids::CurrentLevel) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -2873,8 +3062,11 @@ PacketBufferHandle encodeLevelControlClusterConfigureCurrentLevelAttribute(uint8 */ PacketBufferHandle encodeLevelControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadLevelControlClusterRevision", LEVEL_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadLevelControlClusterRevision", LevelControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2890,8 +3082,8 @@ PacketBufferHandle encodeLevelControlClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeLowPowerClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverLowPowerAttributes", LOW_POWER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverLowPowerAttributes", LowPower::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2900,8 +3092,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadLowPowerClusterRevision", LowPower::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2921,8 +3116,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverMediaInputAttributes", MediaInput::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2931,8 +3126,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadMediaInputMediaInputList", MediaInput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(MediaInput::Attributes::Ids::MediaInputList); COMMAND_FOOTER(); } @@ -2941,8 +3139,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadMediaInputClusterRevision", MediaInput::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -2968,8 +3169,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverMediaPlaybackAttributes", MediaPlayback::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -2978,8 +3179,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadMediaPlaybackClusterRevision", MediaPlayback::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3003,8 +3207,8 @@ PacketBufferHandle encodeMediaPlaybackClusterReadClusterRevisionAttribute(uint8_ PacketBufferHandle encodeNetworkCommissioningClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverNetworkCommissioningAttributes", NETWORK_COMMISSIONING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverNetworkCommissioningAttributes", NetworkCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3013,8 +3217,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadNetworkCommissioningClusterRevision", NetworkCommissioning::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3032,8 +3239,8 @@ PacketBufferHandle encodeNetworkCommissioningClusterReadClusterRevisionAttribute PacketBufferHandle encodeOtaSoftwareUpdateProviderClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverOtaSoftwareUpdateProviderAttributes", OTA_PROVIDER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverOtaSoftwareUpdateProviderAttributes", OtaSoftwareUpdateProvider::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3043,8 +3250,11 @@ PacketBufferHandle encodeOtaSoftwareUpdateProviderClusterDiscoverAttributes(uint PacketBufferHandle encodeOtaSoftwareUpdateProviderClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOtaSoftwareUpdateProviderClusterRevision", OTA_PROVIDER_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadOtaSoftwareUpdateProviderClusterRevision", OtaSoftwareUpdateProvider::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3068,8 +3278,8 @@ PacketBufferHandle encodeOtaSoftwareUpdateProviderClusterReadClusterRevisionAttr PacketBufferHandle encodeOnOffClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverOnOffAttributes", ON_OFF_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverOnOffAttributes", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3078,20 +3288,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadOnOffOnOff", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(OnOff::Attributes::Ids::OnOff) .Put8(16) .Put16(minInterval) .Put16(maxInterval); @@ -3103,8 +3316,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4000); + COMMAND_HEADER("ReadOnOffGlobalSceneControl", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(OnOff::Attributes::Ids::GlobalSceneControl); COMMAND_FOOTER(); } @@ -3113,18 +3329,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4001); + COMMAND_HEADER("ReadOnOffOnTime", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x4001) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(OnOff::Attributes::Ids::OnTime) .Put8(33) .Put16(static_cast(onTime)); COMMAND_FOOTER(); @@ -3135,18 +3354,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4002); + COMMAND_HEADER("ReadOnOffOffWaitTime", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x4002) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(OnOff::Attributes::Ids::OffWaitTime) .Put8(33) .Put16(static_cast(offWaitTime)); COMMAND_FOOTER(); @@ -3157,19 +3379,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x4003); + COMMAND_HEADER("ReadOnOffStartUpOnOff", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x4003) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(OnOff::Attributes::Ids::StartUpOnOff) .Put8(48) .Put8(static_cast(startUpOnOff)); COMMAND_FOOTER(); @@ -3180,8 +3405,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFC); + COMMAND_HEADER("ReadOnOffFeatureMap", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::FeatureMap); COMMAND_FOOTER(); } @@ -3190,8 +3418,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadOnOffClusterRevision", OnOff::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3215,8 +3446,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverOperationalCredentialsAttributes", OperationalCredentials::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3225,8 +3456,11 @@ PacketBufferHandle encodeOperationalCredentialsClusterDiscoverAttributes(uint8_t */ PacketBufferHandle encodeOperationalCredentialsClusterReadFabricsListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOperationalCredentialsFabricsList", OPERATIONAL_CREDENTIALS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadOperationalCredentialsFabricsList", OperationalCredentials::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(OperationalCredentials::Attributes::Ids::FabricsList); COMMAND_FOOTER(); } @@ -3235,8 +3469,11 @@ PacketBufferHandle encodeOperationalCredentialsClusterReadFabricsListAttribute(u */ PacketBufferHandle encodeOperationalCredentialsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadOperationalCredentialsClusterRevision", OPERATIONAL_CREDENTIALS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadOperationalCredentialsClusterRevision", OperationalCredentials::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3254,8 +3491,8 @@ PacketBufferHandle encodeOperationalCredentialsClusterReadClusterRevisionAttribu PacketBufferHandle encodePressureMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPressureMeasurementAttributes", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3264,8 +3501,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadPressureMeasurementMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PressureMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -3273,12 +3513,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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(PressureMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -3291,8 +3531,11 @@ PacketBufferHandle encodePressureMeasurementClusterConfigureMeasuredValueAttribu */ PacketBufferHandle encodePressureMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadPressureMeasurementMinMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PressureMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -3301,8 +3544,11 @@ PacketBufferHandle encodePressureMeasurementClusterReadMinMeasuredValueAttribute */ PacketBufferHandle encodePressureMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadPressureMeasurementMaxMeasuredValue", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PressureMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -3311,8 +3557,11 @@ PacketBufferHandle encodePressureMeasurementClusterReadMaxMeasuredValueAttribute */ PacketBufferHandle encodePressureMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PRESSURE_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadPressureMeasurementClusterRevision", PressureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3334,8 +3583,8 @@ PacketBufferHandle encodePressureMeasurementClusterReadClusterRevisionAttribute( PacketBufferHandle encodePumpConfigurationAndControlClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverPumpConfigurationAndControlAttributes", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverPumpConfigurationAndControlAttributes", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3344,8 +3593,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterDiscoverAttributes(ui */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxPressureAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlMaxPressure", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxPressure", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PumpConfigurationAndControl::Attributes::Ids::MaxPressure); COMMAND_FOOTER(); } @@ -3354,8 +3606,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxPressureAttrib */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxSpeedAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlMaxSpeed", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxSpeed", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PumpConfigurationAndControl::Attributes::Ids::MaxSpeed); COMMAND_FOOTER(); } @@ -3364,8 +3619,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxSpeedAttribute */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxFlowAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlMaxFlow", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadPumpConfigurationAndControlMaxFlow", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PumpConfigurationAndControl::Attributes::Ids::MaxFlow); COMMAND_FOOTER(); } @@ -3375,8 +3633,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadMaxFlowAttribute( PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveOperationModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveOperationMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0011); + COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveOperationMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PumpConfigurationAndControl::Attributes::Ids::EffectiveOperationMode); COMMAND_FOOTER(); } @@ -3386,8 +3647,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveOperatio PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveControlModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveControlMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0012); + COMMAND_HEADER("ReadPumpConfigurationAndControlEffectiveControlMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PumpConfigurationAndControl::Attributes::Ids::EffectiveControlMode); COMMAND_FOOTER(); } @@ -3396,8 +3660,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadEffectiveControlM */ PacketBufferHandle encodePumpConfigurationAndControlClusterReadCapacityAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlCapacity", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0013); + COMMAND_HEADER("ReadPumpConfigurationAndControlCapacity", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PumpConfigurationAndControl::Attributes::Ids::Capacity); COMMAND_FOOTER(); } @@ -3406,12 +3673,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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0013) + .Put32(PumpConfigurationAndControl::Attributes::Ids::Capacity) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -3425,8 +3692,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterConfigureCapacityAttr PacketBufferHandle encodePumpConfigurationAndControlClusterReadOperationModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlOperationMode", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0020); + COMMAND_HEADER("ReadPumpConfigurationAndControlOperationMode", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(PumpConfigurationAndControl::Attributes::Ids::OperationMode); COMMAND_FOOTER(); } @@ -3434,11 +3704,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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0020) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(PumpConfigurationAndControl::Attributes::Ids::OperationMode) .Put8(48) .Put8(static_cast(operationMode)); COMMAND_FOOTER(); @@ -3450,8 +3720,11 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterWriteOperationModeAtt PacketBufferHandle encodePumpConfigurationAndControlClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadPumpConfigurationAndControlClusterRevision", PUMP_CONFIG_CONTROL_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadPumpConfigurationAndControlClusterRevision", PumpConfigurationAndControl::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3469,8 +3742,8 @@ PacketBufferHandle encodePumpConfigurationAndControlClusterReadClusterRevisionAt PacketBufferHandle encodeRelativeHumidityMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverRelativeHumidityMeasurementAttributes", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverRelativeHumidityMeasurementAttributes", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3480,8 +3753,11 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterDiscoverAttributes(ui PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadRelativeHumidityMeasurementMeasuredValue", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadRelativeHumidityMeasurementMeasuredValue", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(RelativeHumidityMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -3490,12 +3766,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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(RelativeHumidityMeasurement::Attributes::Ids::MeasuredValue) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -3509,8 +3785,11 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterConfigureMeasuredValu PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadRelativeHumidityMeasurementMinMeasuredValue", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadRelativeHumidityMeasurementMinMeasuredValue", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(RelativeHumidityMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -3520,8 +3799,11 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMinMeasuredValueA PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadRelativeHumidityMeasurementMaxMeasuredValue", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadRelativeHumidityMeasurementMaxMeasuredValue", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(RelativeHumidityMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -3531,8 +3813,11 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadMaxMeasuredValueA PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadRelativeHumidityMeasurementClusterRevision", RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadRelativeHumidityMeasurementClusterRevision", RelativeHumidityMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3559,8 +3844,8 @@ PacketBufferHandle encodeRelativeHumidityMeasurementClusterReadClusterRevisionAt PacketBufferHandle encodeScenesClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverScenesAttributes", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverScenesAttributes", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3569,8 +3854,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadScenesSceneCount", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Scenes::Attributes::Ids::SceneCount); COMMAND_FOOTER(); } @@ -3579,8 +3867,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadScenesCurrentScene", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Scenes::Attributes::Ids::CurrentScene); COMMAND_FOOTER(); } @@ -3589,8 +3880,11 @@ PacketBufferHandle encodeScenesClusterReadCurrentSceneAttribute(uint8_t seqNum, */ PacketBufferHandle encodeScenesClusterReadCurrentGroupAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadScenesCurrentGroup", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadScenesCurrentGroup", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Scenes::Attributes::Ids::CurrentGroup); COMMAND_FOOTER(); } @@ -3599,8 +3893,11 @@ PacketBufferHandle encodeScenesClusterReadCurrentGroupAttribute(uint8_t seqNum, */ PacketBufferHandle encodeScenesClusterReadSceneValidAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadScenesSceneValid", SCENES_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadScenesSceneValid", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Scenes::Attributes::Ids::SceneValid); COMMAND_FOOTER(); } @@ -3609,8 +3906,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0004); + COMMAND_HEADER("ReadScenesNameSupport", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Scenes::Attributes::Ids::NameSupport); COMMAND_FOOTER(); } @@ -3619,8 +3919,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadScenesClusterRevision", Scenes::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3637,8 +3940,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverSoftwareDiagnosticsAttributes", SoftwareDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3648,8 +3951,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadSoftwareDiagnosticsCurrentHeapHighWatermark", SoftwareDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(SoftwareDiagnostics::Attributes::Ids::CurrentHeapHighWatermark); COMMAND_FOOTER(); } @@ -3658,8 +3964,11 @@ PacketBufferHandle encodeSoftwareDiagnosticsClusterReadCurrentHeapHighWatermarkA */ PacketBufferHandle encodeSoftwareDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadSoftwareDiagnosticsClusterRevision", SOFTWARE_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadSoftwareDiagnosticsClusterRevision", SoftwareDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3676,8 +3985,8 @@ PacketBufferHandle encodeSoftwareDiagnosticsClusterReadClusterRevisionAttribute( PacketBufferHandle encodeSwitchClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverSwitchAttributes", SWITCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverSwitchAttributes", Switch::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3686,8 +3995,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadSwitchNumberOfPositions", Switch::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Switch::Attributes::Ids::NumberOfPositions); COMMAND_FOOTER(); } @@ -3696,20 +4008,23 @@ PacketBufferHandle encodeSwitchClusterReadNumberOfPositionsAttribute(uint8_t seq */ PacketBufferHandle encodeSwitchClusterReadCurrentPositionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadSwitchCurrentPosition", SWITCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadSwitchCurrentPosition", Switch::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0001) + .Put32(Switch::Attributes::Ids::CurrentPosition) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -3722,8 +4037,11 @@ PacketBufferHandle encodeSwitchClusterConfigureCurrentPositionAttribute(uint8_t */ PacketBufferHandle encodeSwitchClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadSwitchClusterRevision", SWITCH_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadSwitchClusterRevision", Switch::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3744,8 +4062,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTvChannelAttributes", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3754,8 +4072,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadTvChannelTvChannelList", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TvChannel::Attributes::Ids::TvChannelList); COMMAND_FOOTER(); } @@ -3764,8 +4085,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadTvChannelTvChannelLineup", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TvChannel::Attributes::Ids::TvChannelLineup); COMMAND_FOOTER(); } @@ -3774,8 +4098,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadTvChannelCurrentTvChannel", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TvChannel::Attributes::Ids::CurrentTvChannel); COMMAND_FOOTER(); } @@ -3784,8 +4111,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadTvChannelClusterRevision", TvChannel::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3802,8 +4132,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTargetNavigatorAttributes", TargetNavigator::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3812,8 +4142,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadTargetNavigatorTargetNavigatorList", TargetNavigator::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TargetNavigator::Attributes::Ids::TargetNavigatorList); COMMAND_FOOTER(); } @@ -3822,8 +4155,11 @@ PacketBufferHandle encodeTargetNavigatorClusterReadTargetNavigatorListAttribute( */ PacketBufferHandle encodeTargetNavigatorClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTargetNavigatorClusterRevision", TARGET_NAVIGATOR_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadTargetNavigatorClusterRevision", TargetNavigator::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3841,8 +4177,8 @@ PacketBufferHandle encodeTargetNavigatorClusterReadClusterRevisionAttribute(uint PacketBufferHandle encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTemperatureMeasurementAttributes", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3851,8 +4187,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadTemperatureMeasurementMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TemperatureMeasurement::Attributes::Ids::MeasuredValue); COMMAND_FOOTER(); } @@ -3861,12 +4200,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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(TemperatureMeasurement::Attributes::Ids::MeasuredValue) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -3879,8 +4218,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterConfigureMeasuredValueAttr */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMinMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadTemperatureMeasurementMinMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TemperatureMeasurement::Attributes::Ids::MinMeasuredValue); COMMAND_FOOTER(); } @@ -3889,8 +4231,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadMinMeasuredValueAttrib */ PacketBufferHandle encodeTemperatureMeasurementClusterReadMaxMeasuredValueAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadTemperatureMeasurementMaxMeasuredValue", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TemperatureMeasurement::Attributes::Ids::MaxMeasuredValue); COMMAND_FOOTER(); } @@ -3899,8 +4244,11 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadMaxMeasuredValueAttrib */ PacketBufferHandle encodeTemperatureMeasurementClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TEMP_MEASUREMENT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadTemperatureMeasurementClusterRevision", TemperatureMeasurement::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -3940,8 +4288,8 @@ PacketBufferHandle encodeTemperatureMeasurementClusterReadClusterRevisionAttribu PacketBufferHandle encodeTestClusterClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverTestClusterAttributes", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverTestClusterAttributes", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -3950,18 +4298,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadTestClusterBoolean", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0000) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Boolean) .Put8(16) .Put8(static_cast(boolean)); COMMAND_FOOTER(); @@ -3972,18 +4323,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBooleanAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadBitmap8Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterBitmap8", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadTestClusterBitmap8", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0001) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Bitmap8) .Put8(24) .Put8(static_cast(bitmap8)); COMMAND_FOOTER(); @@ -3994,18 +4348,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBitmap8Attribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadBitmap16Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterBitmap16", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadTestClusterBitmap16", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0002) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Bitmap16) .Put8(25) .Put16(static_cast(bitmap16)); COMMAND_FOOTER(); @@ -4016,18 +4373,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBitmap16Attribute(uint8_t seqNum */ PacketBufferHandle encodeTestClusterClusterReadBitmap32Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterBitmap32", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadTestClusterBitmap32", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0003) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Bitmap32) .Put8(27) .Put32(static_cast(bitmap32)); COMMAND_FOOTER(); @@ -4038,18 +4398,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBitmap32Attribute(uint8_t seqNum */ PacketBufferHandle encodeTestClusterClusterReadBitmap64Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterBitmap64", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0004); + COMMAND_HEADER("ReadTestClusterBitmap64", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0004) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Bitmap64) .Put8(31) .Put64(static_cast(bitmap64)); COMMAND_FOOTER(); @@ -4060,18 +4423,21 @@ PacketBufferHandle encodeTestClusterClusterWriteBitmap64Attribute(uint8_t seqNum */ PacketBufferHandle encodeTestClusterClusterReadInt8uAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt8u", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0005); + COMMAND_HEADER("ReadTestClusterInt8u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0005) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Int8u) .Put8(32) .Put8(static_cast(int8u)); COMMAND_FOOTER(); @@ -4082,18 +4448,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0006); + COMMAND_HEADER("ReadTestClusterInt16u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0006) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Int16u) .Put8(33) .Put16(static_cast(int16u)); COMMAND_FOOTER(); @@ -4104,18 +4473,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt16uAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt32uAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt32u", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0008); + COMMAND_HEADER("ReadTestClusterInt32u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0008) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Int32u) .Put8(35) .Put32(static_cast(int32u)); COMMAND_FOOTER(); @@ -4126,18 +4498,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt32uAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt64uAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt64u", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000C); + COMMAND_HEADER("ReadTestClusterInt64u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x000C) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Int64u) .Put8(39) .Put64(static_cast(int64u)); COMMAND_FOOTER(); @@ -4148,18 +4523,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt64uAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt8sAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt8s", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000D); + COMMAND_HEADER("ReadTestClusterInt8s", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x000D) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Int8s) .Put8(40) .Put8(static_cast(int8s)); COMMAND_FOOTER(); @@ -4170,18 +4548,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000E); + COMMAND_HEADER("ReadTestClusterInt16s", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x000E) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Int16s) .Put8(41) .Put16(static_cast(int16s)); COMMAND_FOOTER(); @@ -4192,18 +4573,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt16sAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt32sAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt32s", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0010); + COMMAND_HEADER("ReadTestClusterInt32s", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0010) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Int32s) .Put8(43) .Put32(static_cast(int32s)); COMMAND_FOOTER(); @@ -4214,18 +4598,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt32sAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadInt64sAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterInt64s", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0014); + COMMAND_HEADER("ReadTestClusterInt64s", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0014) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Int64s) .Put8(47) .Put64(static_cast(int64s)); COMMAND_FOOTER(); @@ -4236,18 +4623,21 @@ PacketBufferHandle encodeTestClusterClusterWriteInt64sAttribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadEnum8Attribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterEnum8", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0015); + COMMAND_HEADER("ReadTestClusterEnum8", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0015) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Enum8) .Put8(48) .Put8(static_cast(enum8)); COMMAND_FOOTER(); @@ -4258,18 +4648,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0016); + COMMAND_HEADER("ReadTestClusterEnum16", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0016) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Enum16) .Put8(49) .Put16(static_cast(enum16)); COMMAND_FOOTER(); @@ -4280,15 +4673,18 @@ PacketBufferHandle encodeTestClusterClusterWriteEnum16Attribute(uint8_t seqNum, */ PacketBufferHandle encodeTestClusterClusterReadOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterOctetString", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0019); + COMMAND_HEADER("ReadTestClusterOctetString", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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)) { @@ -4298,8 +4694,8 @@ PacketBufferHandle encodeTestClusterClusterWriteOctetStringAttribute(uint8_t seq buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0019) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::OctetString) .Put8(65) .Put(static_cast(octetStringStrLen)) .Put(octetString.data(), octetStringStrLen); @@ -4311,8 +4707,11 @@ PacketBufferHandle encodeTestClusterClusterWriteOctetStringAttribute(uint8_t seq */ PacketBufferHandle encodeTestClusterClusterReadListInt8uAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterListInt8u", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001A); + COMMAND_HEADER("ReadTestClusterListInt8u", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TestCluster::Attributes::Ids::ListInt8u); COMMAND_FOOTER(); } @@ -4321,8 +4720,11 @@ PacketBufferHandle encodeTestClusterClusterReadListInt8uAttribute(uint8_t seqNum */ PacketBufferHandle encodeTestClusterClusterReadListOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterListOctetString", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001B); + COMMAND_HEADER("ReadTestClusterListOctetString", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TestCluster::Attributes::Ids::ListOctetString); COMMAND_FOOTER(); } @@ -4331,8 +4733,11 @@ PacketBufferHandle encodeTestClusterClusterReadListOctetStringAttribute(uint8_t */ PacketBufferHandle encodeTestClusterClusterReadListStructOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterListStructOctetString", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001C); + COMMAND_HEADER("ReadTestClusterListStructOctetString", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(TestCluster::Attributes::Ids::ListStructOctetString); COMMAND_FOOTER(); } @@ -4341,15 +4746,18 @@ PacketBufferHandle encodeTestClusterClusterReadListStructOctetStringAttribute(ui */ PacketBufferHandle encodeTestClusterClusterReadLongOctetStringAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterLongOctetString", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001D); + COMMAND_HEADER("ReadTestClusterLongOctetString", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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)) { @@ -4359,8 +4767,8 @@ PacketBufferHandle encodeTestClusterClusterWriteLongOctetStringAttribute(uint8_t buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x001D) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::LongOctetString) .Put8(67) .Put16(static_cast(longOctetStringStrLen)) .Put(longOctetString.data(), longOctetStringStrLen); @@ -4372,19 +4780,22 @@ PacketBufferHandle encodeTestClusterClusterWriteLongOctetStringAttribute(uint8_t */ PacketBufferHandle encodeTestClusterClusterReadUnsupportedAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterUnsupported", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x00FF); + COMMAND_HEADER("ReadTestClusterUnsupported", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x00FF) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(TestCluster::Attributes::Ids::Unsupported) .Put8(16) .Put8(static_cast(unsupported)); COMMAND_FOOTER(); @@ -4395,8 +4806,11 @@ PacketBufferHandle encodeTestClusterClusterWriteUnsupportedAttribute(uint8_t seq */ PacketBufferHandle encodeTestClusterClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadTestClusterClusterRevision", TEST_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadTestClusterClusterRevision", TestCluster::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -4421,8 +4835,8 @@ PacketBufferHandle encodeTestClusterClusterReadClusterRevisionAttribute(uint8_t PacketBufferHandle encodeThermostatClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverThermostatAttributes", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverThermostatAttributes", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -4431,8 +4845,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadThermostatLocalTemperature", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Thermostat::Attributes::Ids::LocalTemperature); COMMAND_FOOTER(); } @@ -4440,12 +4857,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) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0000) + .Put32(Thermostat::Attributes::Ids::LocalTemperature) .Put8(41) .Put16(minInterval) .Put16(maxInterval); @@ -4458,19 +4875,22 @@ PacketBufferHandle encodeThermostatClusterConfigureLocalTemperatureAttribute(uin */ PacketBufferHandle encodeThermostatClusterReadOccupiedCoolingSetpointAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatOccupiedCoolingSetpoint", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0011); + COMMAND_HEADER("ReadThermostatOccupiedCoolingSetpoint", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0011) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(Thermostat::Attributes::Ids::OccupiedCoolingSetpoint) .Put8(41) .Put16(static_cast(occupiedCoolingSetpoint)); COMMAND_FOOTER(); @@ -4481,19 +4901,22 @@ PacketBufferHandle encodeThermostatClusterWriteOccupiedCoolingSetpointAttribute( */ PacketBufferHandle encodeThermostatClusterReadOccupiedHeatingSetpointAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatOccupiedHeatingSetpoint", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0012); + COMMAND_HEADER("ReadThermostatOccupiedHeatingSetpoint", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0012) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(Thermostat::Attributes::Ids::OccupiedHeatingSetpoint) .Put8(41) .Put16(static_cast(occupiedHeatingSetpoint)); COMMAND_FOOTER(); @@ -4504,19 +4927,22 @@ PacketBufferHandle encodeThermostatClusterWriteOccupiedHeatingSetpointAttribute( */ PacketBufferHandle encodeThermostatClusterReadControlSequenceOfOperationAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatControlSequenceOfOperation", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001B); + COMMAND_HEADER("ReadThermostatControlSequenceOfOperation", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x001B) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(Thermostat::Attributes::Ids::ControlSequenceOfOperation) .Put8(48) .Put8(static_cast(controlSequenceOfOperation)); COMMAND_FOOTER(); @@ -4527,19 +4953,22 @@ PacketBufferHandle encodeThermostatClusterWriteControlSequenceOfOperationAttribu */ PacketBufferHandle encodeThermostatClusterReadSystemModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatSystemMode", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001C); + COMMAND_HEADER("ReadThermostatSystemMode", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x001C) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(Thermostat::Attributes::Ids::SystemMode) .Put8(48) .Put8(static_cast(systemMode)); COMMAND_FOOTER(); @@ -4550,8 +4979,11 @@ PacketBufferHandle encodeThermostatClusterWriteSystemModeAttribute(uint8_t seqNu */ PacketBufferHandle encodeThermostatClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThermostatClusterRevision", THERMOSTAT_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadThermostatClusterRevision", Thermostat::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -4627,8 +5059,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).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverThreadNetworkDiagnosticsAttributes", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -4637,8 +5069,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterDiscoverAttributes(uint8 */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChannelAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsChannel", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsChannel", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::Channel); COMMAND_FOOTER(); } @@ -4647,8 +5082,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChannelAttribute(uin */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRoutingRoleAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRoutingRole", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRoutingRole", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RoutingRole); COMMAND_FOOTER(); } @@ -4657,8 +5095,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRoutingRoleAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadNetworkNameAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsNetworkName", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsNetworkName", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::NetworkName); COMMAND_FOOTER(); } @@ -4667,8 +5108,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadNetworkNameAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPanIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsPanId", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsPanId", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::PanId); COMMAND_FOOTER(); } @@ -4677,8 +5121,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPanIdAttribute(uint8 */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadExtendedPanIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsExtendedPanId", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0004); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsExtendedPanId", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::ExtendedPanId); COMMAND_FOOTER(); } @@ -4687,8 +5134,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadExtendedPanIdAttribu */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadMeshLocalPrefixAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsMeshLocalPrefix", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0005); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsMeshLocalPrefix", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::MeshLocalPrefix); COMMAND_FOOTER(); } @@ -4697,8 +5147,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadMeshLocalPrefixAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadOverrunCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsOverrunCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0006); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsOverrunCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::OverrunCount); COMMAND_FOOTER(); } @@ -4708,8 +5161,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadOverrunCountAttribut PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadNeighborTableListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsNeighborTableList", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0007); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsNeighborTableList", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::NeighborTableList); COMMAND_FOOTER(); } @@ -4718,8 +5174,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadNeighborTableListAtt */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRouteTableListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRouteTableList", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0008); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRouteTableList", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RouteTableList); COMMAND_FOOTER(); } @@ -4728,8 +5187,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRouteTableListAttrib */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPartitionIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsPartitionId", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0009); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsPartitionId", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::PartitionId); COMMAND_FOOTER(); } @@ -4738,8 +5200,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPartitionIdAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadWeightingAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsWeighting", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000A); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsWeighting", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::Weighting); COMMAND_FOOTER(); } @@ -4748,8 +5213,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadWeightingAttribute(u */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadDataVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsDataVersion", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000B); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsDataVersion", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::DataVersion); COMMAND_FOOTER(); } @@ -4759,8 +5227,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadDataVersionAttribute PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadStableDataVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsStableDataVersion", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000C); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsStableDataVersion", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::StableDataVersion); COMMAND_FOOTER(); } @@ -4769,8 +5240,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadStableDataVersionAtt */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadLeaderRouterIdAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsLeaderRouterId", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000D); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsLeaderRouterId", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::LeaderRouterId); COMMAND_FOOTER(); } @@ -4780,8 +5254,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadLeaderRouterIdAttrib PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadDetachedRoleCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsDetachedRoleCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000E); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsDetachedRoleCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::DetachedRoleCount); COMMAND_FOOTER(); } @@ -4790,8 +5267,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadDetachedRoleCountAtt */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChildRoleCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsChildRoleCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000F); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsChildRoleCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::ChildRoleCount); COMMAND_FOOTER(); } @@ -4800,8 +5280,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChildRoleCountAttrib */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRouterRoleCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRouterRoleCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0010); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRouterRoleCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RouterRoleCount); COMMAND_FOOTER(); } @@ -4810,8 +5293,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRouterRoleCountAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadLeaderRoleCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsLeaderRoleCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0011); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsLeaderRoleCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::LeaderRoleCount); COMMAND_FOOTER(); } @@ -4821,8 +5307,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadLeaderRoleCountAttri PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadAttachAttemptCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsAttachAttemptCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0012); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsAttachAttemptCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::AttachAttemptCount); COMMAND_FOOTER(); } @@ -4832,8 +5321,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadAttachAttemptCountAt PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPartitionIdChangeCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsPartitionIdChangeCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0013); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsPartitionIdChangeCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::PartitionIdChangeCount); COMMAND_FOOTER(); } @@ -4843,8 +5335,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadPartitionIdChangeCou PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadBetterPartitionAttachAttemptCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0014); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::BetterPartitionAttachAttemptCount); COMMAND_FOOTER(); } @@ -4854,8 +5349,11 @@ encodeThreadNetworkDiagnosticsClusterReadBetterPartitionAttachAttemptCountAttrib PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadParentChangeCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsParentChangeCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0015); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsParentChangeCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::ParentChangeCount); COMMAND_FOOTER(); } @@ -4864,8 +5362,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadParentChangeCountAtt */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxTotalCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxTotalCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0016); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxTotalCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxTotalCount); COMMAND_FOOTER(); } @@ -4874,8 +5375,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxTotalCountAttribut */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxUnicastCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxUnicastCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0017); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxUnicastCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxUnicastCount); COMMAND_FOOTER(); } @@ -4885,8 +5389,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxUnicastCountAttrib PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBroadcastCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBroadcastCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0018); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBroadcastCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxBroadcastCount); COMMAND_FOOTER(); } @@ -4896,8 +5403,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBroadcastCountAttr PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxAckRequestedCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxAckRequestedCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0019); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxAckRequestedCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxAckRequestedCount); COMMAND_FOOTER(); } @@ -4906,8 +5416,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxAckRequestedCountA */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxAckedCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxAckedCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001A); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxAckedCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxAckedCount); COMMAND_FOOTER(); } @@ -4917,8 +5430,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxAckedCountAttribut PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxNoAckRequestedCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxNoAckRequestedCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001B); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxNoAckRequestedCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxNoAckRequestedCount); COMMAND_FOOTER(); } @@ -4927,8 +5443,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxNoAckRequestedCoun */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDataCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDataCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001C); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDataCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxDataCount); COMMAND_FOOTER(); } @@ -4937,8 +5456,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDataCountAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDataPollCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDataPollCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001D); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDataPollCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxDataPollCount); COMMAND_FOOTER(); } @@ -4947,8 +5469,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDataPollCountAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBeaconCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBeaconCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001E); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBeaconCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxBeaconCount); COMMAND_FOOTER(); } @@ -4958,8 +5483,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBeaconCountAttribu PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBeaconRequestCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBeaconRequestCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001F); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxBeaconRequestCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxBeaconRequestCount); COMMAND_FOOTER(); } @@ -4968,8 +5496,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxBeaconRequestCount */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxOtherCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxOtherCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0020); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxOtherCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxOtherCount); COMMAND_FOOTER(); } @@ -4978,8 +5509,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxOtherCountAttribut */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxRetryCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxRetryCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0021); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxRetryCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxRetryCount); COMMAND_FOOTER(); } @@ -4989,8 +5523,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxRetryCountAttribut PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDirectMaxRetryExpiryCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0022); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxDirectMaxRetryExpiryCount); COMMAND_FOOTER(); } @@ -5000,8 +5537,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxDirectMaxRetryExpi PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxIndirectMaxRetryExpiryCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0023); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxIndirectMaxRetryExpiryCount); COMMAND_FOOTER(); } @@ -5010,8 +5550,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxIndirectMaxRetryEx */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrCcaCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrCcaCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0024); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrCcaCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxErrCcaCount); COMMAND_FOOTER(); } @@ -5020,8 +5563,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrCcaCountAttribu */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrAbortCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrAbortCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0025); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrAbortCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxErrAbortCount); COMMAND_FOOTER(); } @@ -5031,8 +5577,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrAbortCountAttri PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrBusyChannelCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrBusyChannelCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0026); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsTxErrBusyChannelCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::TxErrBusyChannelCount); COMMAND_FOOTER(); } @@ -5041,8 +5590,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadTxErrBusyChannelCoun */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxTotalCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxTotalCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0027); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxTotalCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxTotalCount); COMMAND_FOOTER(); } @@ -5051,8 +5603,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxTotalCountAttribut */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxUnicastCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxUnicastCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0028); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxUnicastCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxUnicastCount); COMMAND_FOOTER(); } @@ -5062,8 +5617,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxUnicastCountAttrib PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBroadcastCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBroadcastCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0029); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBroadcastCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxBroadcastCount); COMMAND_FOOTER(); } @@ -5072,8 +5630,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBroadcastCountAttr */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDataCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDataCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x002A); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDataCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxDataCount); COMMAND_FOOTER(); } @@ -5082,8 +5643,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDataCountAttribute */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDataPollCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDataPollCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x002B); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDataPollCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxDataPollCount); COMMAND_FOOTER(); } @@ -5092,8 +5656,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDataPollCountAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBeaconCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBeaconCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x002C); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBeaconCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxBeaconCount); COMMAND_FOOTER(); } @@ -5103,8 +5670,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBeaconCountAttribu PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBeaconRequestCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBeaconRequestCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x002D); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxBeaconRequestCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxBeaconRequestCount); COMMAND_FOOTER(); } @@ -5113,8 +5683,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxBeaconRequestCount */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxOtherCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxOtherCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x002E); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxOtherCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxOtherCount); COMMAND_FOOTER(); } @@ -5124,8 +5697,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxOtherCountAttribut PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxAddressFilteredCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxAddressFilteredCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x002F); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxAddressFilteredCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxAddressFilteredCount); COMMAND_FOOTER(); } @@ -5135,8 +5711,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxAddressFilteredCou PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDestAddrFilteredCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0030); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxDestAddrFilteredCount); COMMAND_FOOTER(); } @@ -5146,8 +5725,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDestAddrFilteredCo PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDuplicatedCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDuplicatedCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0031); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxDuplicatedCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxDuplicatedCount); COMMAND_FOOTER(); } @@ -5157,8 +5739,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxDuplicatedCountAtt PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrNoFrameCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrNoFrameCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0032); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrNoFrameCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxErrNoFrameCount); COMMAND_FOOTER(); } @@ -5168,8 +5753,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrNoFrameCountAtt PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrUnknownNeighborCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0033); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxErrUnknownNeighborCount); COMMAND_FOOTER(); } @@ -5179,8 +5767,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrUnknownNeighbor PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrInvalidSrcAddrCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0034); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxErrInvalidSrcAddrCount); COMMAND_FOOTER(); } @@ -5189,8 +5780,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrInvalidSrcAddrC */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrSecCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrSecCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0035); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrSecCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxErrSecCount); COMMAND_FOOTER(); } @@ -5199,8 +5793,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrSecCountAttribu */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrFcsCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrFcsCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0036); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrFcsCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxErrFcsCount); COMMAND_FOOTER(); } @@ -5209,8 +5806,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrFcsCountAttribu */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrOtherCountAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrOtherCount", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0037); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsRxErrOtherCount", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::RxErrOtherCount); COMMAND_FOOTER(); } @@ -5219,8 +5819,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadRxErrOtherCountAttri */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadSecurityPolicyAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsSecurityPolicy", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x003B); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsSecurityPolicy", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::SecurityPolicy); COMMAND_FOOTER(); } @@ -5229,8 +5832,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadSecurityPolicyAttrib */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChannelMaskAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsChannelMask", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x003C); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsChannelMask", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::ChannelMask); COMMAND_FOOTER(); } @@ -5240,8 +5846,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadChannelMaskAttribute PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadOperationalDatasetComponentsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsOperationalDatasetComponents", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x003D); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsOperationalDatasetComponents", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::OperationalDatasetComponents); COMMAND_FOOTER(); } @@ -5251,8 +5860,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadOperationalDatasetCo PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadActiveNetworkFaultsListAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsActiveNetworkFaultsList", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x003E); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsActiveNetworkFaultsList", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(ThreadNetworkDiagnostics::Attributes::Ids::ActiveNetworkFaultsList); COMMAND_FOOTER(); } @@ -5261,8 +5873,11 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadActiveNetworkFaultsL */ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadThreadNetworkDiagnosticsClusterRevision", THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadThreadNetworkDiagnosticsClusterRevision", ThreadNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -5278,8 +5893,8 @@ PacketBufferHandle encodeThreadNetworkDiagnosticsClusterReadClusterRevisionAttri PacketBufferHandle encodeWakeOnLanClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverWakeOnLanAttributes", WAKE_ON_LAN_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverWakeOnLanAttributes", WakeOnLan::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -5288,8 +5903,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).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadWakeOnLanWakeOnLanMacAddress", WakeOnLan::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WakeOnLan::Attributes::Ids::WakeOnLanMacAddress); COMMAND_FOOTER(); } @@ -5298,8 +5916,11 @@ PacketBufferHandle encodeWakeOnLanClusterReadWakeOnLanMacAddressAttribute(uint8_ */ PacketBufferHandle encodeWakeOnLanClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWakeOnLanClusterRevision", WAKE_ON_LAN_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadWakeOnLanClusterRevision", WakeOnLan::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -5319,8 +5940,8 @@ PacketBufferHandle encodeWakeOnLanClusterReadClusterRevisionAttribute(uint8_t se PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverWiFiNetworkDiagnosticsAttributes", WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverWiFiNetworkDiagnosticsAttributes", WiFiNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -5329,8 +5950,11 @@ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterDiscoverAttributes(uint8_t */ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadBssidAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWiFiNetworkDiagnosticsBssid", WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadWiFiNetworkDiagnosticsBssid", WiFiNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WiFiNetworkDiagnostics::Attributes::Ids::Bssid); COMMAND_FOOTER(); } @@ -5339,8 +5963,11 @@ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadBssidAttribute(uint8_t */ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadSecurityTypeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWiFiNetworkDiagnosticsSecurityType", WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0001); + COMMAND_HEADER("ReadWiFiNetworkDiagnosticsSecurityType", WiFiNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WiFiNetworkDiagnostics::Attributes::Ids::SecurityType); COMMAND_FOOTER(); } @@ -5349,8 +5976,11 @@ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadSecurityTypeAttribute( */ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadWiFiVersionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWiFiNetworkDiagnosticsWiFiVersion", WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0002); + COMMAND_HEADER("ReadWiFiNetworkDiagnosticsWiFiVersion", WiFiNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WiFiNetworkDiagnostics::Attributes::Ids::WiFiVersion); COMMAND_FOOTER(); } @@ -5359,8 +5989,11 @@ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadWiFiVersionAttribute(u */ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadChannelNumberAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWiFiNetworkDiagnosticsChannelNumber", WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadWiFiNetworkDiagnosticsChannelNumber", WiFiNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WiFiNetworkDiagnostics::Attributes::Ids::ChannelNumber); COMMAND_FOOTER(); } @@ -5369,8 +6002,11 @@ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadChannelNumberAttribute */ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadRssiAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWiFiNetworkDiagnosticsRssi", WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0004); + COMMAND_HEADER("ReadWiFiNetworkDiagnosticsRssi", WiFiNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WiFiNetworkDiagnostics::Attributes::Ids::Rssi); COMMAND_FOOTER(); } @@ -5379,8 +6015,11 @@ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadRssiAttribute(uint8_t */ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWiFiNetworkDiagnosticsClusterRevision", WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadWiFiNetworkDiagnosticsClusterRevision", WiFiNetworkDiagnostics::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); } @@ -5420,8 +6059,8 @@ PacketBufferHandle encodeWiFiNetworkDiagnosticsClusterReadClusterRevisionAttribu PacketBufferHandle encodeWindowCoveringClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("DiscoverWindowCoveringAttributes", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put32(0x0000).Put8(0xFF); + COMMAND_HEADER("DiscoverWindowCoveringAttributes", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(Globals::Commands::Ids::DiscoverAttributes).Put32(0x0000).Put8(0xFF); COMMAND_FOOTER(); } @@ -5430,8 +6069,11 @@ PacketBufferHandle encodeWindowCoveringClusterDiscoverAttributes(uint8_t seqNum, */ PacketBufferHandle encodeWindowCoveringClusterReadTypeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringType", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0000); + COMMAND_HEADER("ReadWindowCoveringType", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::Type); COMMAND_FOOTER(); } @@ -5440,8 +6082,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadTypeAttribute(uint8_t seqNum, */ PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringCurrentPositionLift", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0003); + COMMAND_HEADER("ReadWindowCoveringCurrentPositionLift", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionLift); COMMAND_FOOTER(); } @@ -5450,8 +6095,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionLiftAttribute(u */ PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringCurrentPositionTilt", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0004); + COMMAND_HEADER("ReadWindowCoveringCurrentPositionTilt", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionTilt); COMMAND_FOOTER(); } @@ -5460,8 +6108,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionTiltAttribute(u */ PacketBufferHandle encodeWindowCoveringClusterReadConfigStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringConfigStatus", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0007); + COMMAND_HEADER("ReadWindowCoveringConfigStatus", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::ConfigStatus); COMMAND_FOOTER(); } @@ -5471,8 +6122,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadConfigStatusAttribute(uint8_t PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionLiftPercentageAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringCurrentPositionLiftPercentage", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0008); + COMMAND_HEADER("ReadWindowCoveringCurrentPositionLiftPercentage", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionLiftPercentage); COMMAND_FOOTER(); } @@ -5481,12 +6135,12 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionLiftPercen uint16_t minInterval, uint16_t maxInterval, uint8_t change) { - COMMAND_HEADER("ReportWindowCoveringCurrentPositionLiftPercentage", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringCurrentPositionLiftPercentage", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0008) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionLiftPercentage) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -5500,8 +6154,11 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionLiftPercen PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionTiltPercentageAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringCurrentPositionTiltPercentage", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0009); + COMMAND_HEADER("ReadWindowCoveringCurrentPositionTiltPercentage", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionTiltPercentage); COMMAND_FOOTER(); } @@ -5510,12 +6167,12 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionTiltPercen uint16_t minInterval, uint16_t maxInterval, uint8_t change) { - COMMAND_HEADER("ReportWindowCoveringCurrentPositionTiltPercentage", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringCurrentPositionTiltPercentage", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x0009) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionTiltPercentage) .Put8(32) .Put16(minInterval) .Put16(maxInterval); @@ -5528,20 +6185,23 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionTiltPercen */ PacketBufferHandle encodeWindowCoveringClusterReadOperationalStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringOperationalStatus", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000A); + COMMAND_HEADER("ReadWindowCoveringOperationalStatus", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::OperationalStatus); COMMAND_FOOTER(); } PacketBufferHandle encodeWindowCoveringClusterConfigureOperationalStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval) { - COMMAND_HEADER("ReportWindowCoveringOperationalStatus", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringOperationalStatus", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x000A) + .Put32(WindowCovering::Attributes::Ids::OperationalStatus) .Put8(24) .Put16(minInterval) .Put16(maxInterval); @@ -5554,20 +6214,23 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureOperationalStatusAttribut PacketBufferHandle encodeWindowCoveringClusterReadTargetPositionLiftPercent100thsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringTargetPositionLiftPercent100ths", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000B); + COMMAND_HEADER("ReadWindowCoveringTargetPositionLiftPercent100ths", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::TargetPositionLiftPercent100ths); COMMAND_FOOTER(); } PacketBufferHandle encodeWindowCoveringClusterConfigureTargetPositionLiftPercent100thsAttribute( uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportWindowCoveringTargetPositionLiftPercent100ths", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringTargetPositionLiftPercent100ths", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x000B) + .Put32(WindowCovering::Attributes::Ids::TargetPositionLiftPercent100ths) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -5581,20 +6244,23 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureTargetPositionLiftPercent PacketBufferHandle encodeWindowCoveringClusterReadTargetPositionTiltPercent100thsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringTargetPositionTiltPercent100ths", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000C); + COMMAND_HEADER("ReadWindowCoveringTargetPositionTiltPercent100ths", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::TargetPositionTiltPercent100ths); COMMAND_FOOTER(); } PacketBufferHandle encodeWindowCoveringClusterConfigureTargetPositionTiltPercent100thsAttribute( uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportWindowCoveringTargetPositionTiltPercent100ths", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringTargetPositionTiltPercent100ths", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x000C) + .Put32(WindowCovering::Attributes::Ids::TargetPositionTiltPercent100ths) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -5607,8 +6273,11 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureTargetPositionTiltPercent */ PacketBufferHandle encodeWindowCoveringClusterReadEndProductTypeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringEndProductType", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000D); + COMMAND_HEADER("ReadWindowCoveringEndProductType", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::EndProductType); COMMAND_FOOTER(); } @@ -5618,20 +6287,23 @@ PacketBufferHandle encodeWindowCoveringClusterReadEndProductTypeAttribute(uint8_ PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionLiftPercent100thsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringCurrentPositionLiftPercent100ths", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000E); + COMMAND_HEADER("ReadWindowCoveringCurrentPositionLiftPercent100ths", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionLiftPercent100ths); COMMAND_FOOTER(); } PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionLiftPercent100thsAttribute( uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportWindowCoveringCurrentPositionLiftPercent100ths", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringCurrentPositionLiftPercent100ths", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x000E) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionLiftPercent100ths) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -5645,20 +6317,23 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionLiftPercen PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionTiltPercent100thsAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringCurrentPositionTiltPercent100ths", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x000F); + COMMAND_HEADER("ReadWindowCoveringCurrentPositionTiltPercent100ths", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionTiltPercent100ths); COMMAND_FOOTER(); } PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionTiltPercent100thsAttribute( uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval, uint16_t change) { - COMMAND_HEADER("ReportWindowCoveringCurrentPositionTiltPercent100ths", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringCurrentPositionTiltPercent100ths", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x000F) + .Put32(WindowCovering::Attributes::Ids::CurrentPositionTiltPercent100ths) .Put8(33) .Put16(minInterval) .Put16(maxInterval); @@ -5671,8 +6346,11 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionTiltPercen */ PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitLift", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0010); + COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitLift", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::InstalledOpenLimitLift); COMMAND_FOOTER(); } @@ -5681,8 +6359,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitLiftAttribut */ PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitLift", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0011); + COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitLift", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::InstalledClosedLimitLift); COMMAND_FOOTER(); } @@ -5691,8 +6372,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitLiftAttrib */ PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitTilt", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0012); + COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitTilt", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::InstalledOpenLimitTilt); COMMAND_FOOTER(); } @@ -5701,8 +6385,11 @@ PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitTiltAttribut */ PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitTilt", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0013); + COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitTilt", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::InstalledClosedLimitTilt); COMMAND_FOOTER(); } @@ -5711,18 +6398,21 @@ PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitTiltAttrib */ PacketBufferHandle encodeWindowCoveringClusterReadModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringMode", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x0017); + COMMAND_HEADER("ReadWindowCoveringMode", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(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) - .Put32(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) - .Put32(0x0017) + .Put32(Globals::Commands::Ids::WriteAttributes) + .Put32(WindowCovering::Attributes::Ids::Mode) .Put8(24) .Put8(static_cast(mode)); COMMAND_FOOTER(); @@ -5733,20 +6423,23 @@ PacketBufferHandle encodeWindowCoveringClusterWriteModeAttribute(uint8_t seqNum, */ PacketBufferHandle encodeWindowCoveringClusterReadSafetyStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringSafetyStatus", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0x001A); + COMMAND_HEADER("ReadWindowCoveringSafetyStatus", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(WindowCovering::Attributes::Ids::SafetyStatus); COMMAND_FOOTER(); } PacketBufferHandle encodeWindowCoveringClusterConfigureSafetyStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint16_t minInterval, uint16_t maxInterval) { - COMMAND_HEADER("ReportWindowCoveringSafetyStatus", WINDOW_COVERING_CLUSTER_ID); + COMMAND_HEADER("ReportWindowCoveringSafetyStatus", WindowCovering::Id); buf.Put8(kFrameControlGlobalCommand) .Put8(seqNum) - .Put32(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put32(Globals::Commands::Ids::ConfigureReporting) .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) - .Put32(0x001A) + .Put32(WindowCovering::Attributes::Ids::SafetyStatus) .Put8(25) .Put16(minInterval) .Put16(maxInterval); @@ -5758,7 +6451,10 @@ PacketBufferHandle encodeWindowCoveringClusterConfigureSafetyStatusAttribute(uin */ PacketBufferHandle encodeWindowCoveringClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) { - COMMAND_HEADER("ReadWindowCoveringClusterRevision", WINDOW_COVERING_CLUSTER_ID); - buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put32(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put32(0xFFFD); + COMMAND_HEADER("ReadWindowCoveringClusterRevision", WindowCovering::Id); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put32(Globals::Commands::Ids::ReadAttributes) + .Put32(Globals::Attributes::Ids::ClusterRevision); COMMAND_FOOTER(); }