From 176598013396234bff1d8bb3ff87e431f7f0f6b2 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 3 Nov 2020 21:42:28 +0100 Subject: [PATCH] Add discover attributes supports to chip-tool and src/app (#3583) --- .../chip-tool/commands/clusters/Commands.h | 261 ++++++++++++++++-- src/app/chip-zcl-zpro-codec-api.h | 60 ++++ src/app/encoder.cpp | 67 +++++ 3 files changed, 369 insertions(+), 19 deletions(-) diff --git a/examples/chip-tool/commands/clusters/Commands.h b/examples/chip-tool/commands/clusters/Commands.h index 702c7e4d5f0b5e..f880ba6f771d5f 100644 --- a/examples/chip-tool/commands/clusters/Commands.h +++ b/examples/chip-tool/commands/clusters/Commands.h @@ -726,6 +726,27 @@ class BarrierControlStop : public ModelCommand } }; +/* + * Discover attributes + */ +class DiscoverBarrierControlAttributes : public ModelCommand +{ +public: + DiscoverBarrierControlAttributes() : ModelCommand("discover", kBarrierControlClusterId, 0x0c) { ModelCommand::AddArguments(); } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeBarrierControlClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute MovingState */ @@ -864,6 +885,27 @@ class BasicResetToFactoryDefaults : public ModelCommand } }; +/* + * Discover attributes + */ +class DiscoverBasicAttributes : public ModelCommand +{ +public: + DiscoverBasicAttributes() : ModelCommand("discover", kBasicClusterId, 0x0c) { ModelCommand::AddArguments(); } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeBasicClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute ZCLVersion */ @@ -1488,6 +1530,27 @@ class ColorControlStopMoveStep : public ModelCommand uint8_t mOptionsOverride; }; +/* + * Discover attributes + */ +class DiscoverColorControlAttributes : public ModelCommand +{ +public: + DiscoverColorControlAttributes() : ModelCommand("discover", kColorControlClusterId, 0x0c) { ModelCommand::AddArguments(); } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeColorControlClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute CurrentHue */ @@ -3919,6 +3982,27 @@ class DoorLockUnlockWithTimeout : public ModelCommand char * mPINOrRFIDCode; }; +/* + * Discover attributes + */ +class DiscoverDoorLockAttributes : public ModelCommand +{ +public: + DiscoverDoorLockAttributes() : ModelCommand("discover", kDoorLockClusterId, 0x0c) { ModelCommand::AddArguments(); } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeDoorLockClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute LockState */ @@ -4317,6 +4401,27 @@ class GroupsViewGroup : public ModelCommand chip::GroupId mGroupId; }; +/* + * Discover attributes + */ +class DiscoverGroupsAttributes : public ModelCommand +{ +public: + DiscoverGroupsAttributes() : ModelCommand("discover", kGroupsClusterId, 0x0c) { ModelCommand::AddArguments(); } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeGroupsClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute NameSupport */ @@ -4433,6 +4538,27 @@ class IdentifyIdentifyQuery : public ModelCommand } }; +/* + * Discover attributes + */ +class DiscoverIdentifyAttributes : public ModelCommand +{ +public: + DiscoverIdentifyAttributes() : ModelCommand("discover", kIdentifyClusterId, 0x0c) { ModelCommand::AddArguments(); } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeIdentifyClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute IdentifyTime */ @@ -4778,6 +4904,27 @@ class LevelStopWithOnOff : public ModelCommand uint8_t mOptionsOverride; }; +/* + * Discover attributes + */ +class DiscoverLevelAttributes : public ModelCommand +{ +public: + DiscoverLevelAttributes() : ModelCommand("discover", kLevelClusterId, 0x0c) { ModelCommand::AddArguments(); } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeLevelClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute CurrentLevel */ @@ -4881,6 +5028,27 @@ class OnOffToggle : public ModelCommand } }; +/* + * Discover attributes + */ +class DiscoverOnOffAttributes : public ModelCommand +{ +public: + DiscoverOnOffAttributes() : ModelCommand("discover", kOnOffClusterId, 0x0c) { ModelCommand::AddArguments(); } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeOnOffClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute OnOff */ @@ -5378,6 +5546,27 @@ class ScenesViewScene : public ModelCommand uint8_t mSceneID; }; +/* + * Discover attributes + */ +class DiscoverScenesAttributes : public ModelCommand +{ +public: + DiscoverScenesAttributes() : ModelCommand("discover", kScenesClusterId, 0x0c) { ModelCommand::AddArguments(); } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeScenesClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute SceneCount */ @@ -5517,6 +5706,30 @@ class ReadScenesNameSupport : public ModelCommand | * MaxMeasuredValue | 0x0002 | \*----------------------------------------------------------------------------*/ +/* + * Discover attributes + */ +class DiscoverTemperatureMeasurementAttributes : public ModelCommand +{ +public: + DiscoverTemperatureMeasurementAttributes() : ModelCommand("discover", kTempMeasurementClusterId, 0x0c) + { + ModelCommand::AddArguments(); + } + + uint16_t EncodeCommand(PacketBuffer * buffer, uint16_t bufferSize, uint8_t endPointId) override + { + return encodeTemperatureMeasurementClusterDiscoverAttributes(buffer->Start(), bufferSize, endPointId); + } + + // Global Response: DiscoverAttributesResponse + bool HandleGlobalResponse(uint8_t commandId, uint8_t * message, uint16_t messageLen) const override + { + DiscoverAttributesResponse response; + return response.HandleCommandResponse(commandId, message, messageLen); + } +}; + /* * Attribute MeasuredValue */ @@ -5600,9 +5813,10 @@ void registerClusterBarrierControl(Commands & commands) const char * clusterName = "BarrierControl"; commands_list clusterCommands = { - make_unique(), make_unique(), - make_unique(), make_unique(), - make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), }; commands.Register(clusterName, clusterCommands); @@ -5614,6 +5828,7 @@ void registerClusterBasic(Commands & commands) commands_list clusterCommands = { make_unique(), + make_unique(), make_unique(), make_unique(), }; @@ -5640,6 +5855,7 @@ void registerClusterColorControl(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -5702,8 +5918,8 @@ void registerClusterDoorLock(Commands & commands) make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), - make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), }; commands.Register(clusterName, clusterCommands); @@ -5714,9 +5930,10 @@ void registerClusterGroups(Commands & commands) const char * clusterName = "Groups"; commands_list clusterCommands = { - make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), - make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), }; commands.Register(clusterName, clusterCommands); @@ -5727,9 +5944,8 @@ void registerClusterIdentify(Commands & commands) const char * clusterName = "Identify"; commands_list clusterCommands = { - make_unique(), - make_unique(), - make_unique(), + make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), }; @@ -5741,9 +5957,16 @@ void registerClusterLevel(Commands & commands) const char * clusterName = "Level"; commands_list clusterCommands = { - make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), + make_unique(), }; commands.Register(clusterName, clusterCommands); @@ -5754,9 +5977,7 @@ void registerClusterOnOff(Commands & commands) const char * clusterName = "OnOff"; commands_list clusterCommands = { - make_unique(), - make_unique(), - make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), }; @@ -5770,8 +5991,9 @@ void registerClusterScenes(Commands & commands) commands_list clusterCommands = { make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), + make_unique(), }; commands.Register(clusterName, clusterCommands); @@ -5782,6 +6004,7 @@ void registerClusterTempMeasurement(Commands & commands) const char * clusterName = "TemperatureMeasurement"; commands_list clusterCommands = { + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/src/app/chip-zcl-zpro-codec-api.h b/src/app/chip-zcl-zpro-codec-api.h index e2c6b730ffb3d2..ca3e1b4388c447 100644 --- a/src/app/chip-zcl-zpro-codec-api.h +++ b/src/app/chip-zcl-zpro-codec-api.h @@ -73,6 +73,12 @@ uint16_t encodeBarrierControlClusterGoToPercentCommand(uint8_t * buffer, uint16_ */ uint16_t encodeBarrierControlClusterStopCommand(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeBarrierControlClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the moving-state attribute for server into buffer including the APS frame @@ -118,6 +124,12 @@ uint16_t encodeBarrierControlClusterReadBarrierPositionAttribute(uint8_t * buffe */ uint16_t encodeBasicClusterResetToFactoryDefaultsCommand(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeBasicClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the zclversion attribute for server into buffer including the APS frame @@ -307,6 +319,12 @@ uint16_t encodeColorControlClusterStepSaturationCommand(uint8_t * buffer, uint16 uint16_t encodeColorControlClusterStopMoveStepCommand(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint, uint8_t optionsMask, uint8_t optionsOverride); +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeColorControlClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the current-hue attribute for server into buffer including the APS frame @@ -788,6 +806,12 @@ uint16_t encodeDoorLockClusterUnlockDoorCommand(uint8_t * buffer, uint16_t buf_l uint16_t encodeDoorLockClusterUnlockWithTimeoutCommand(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint, uint16_t timeoutInSeconds, char * pINOrRFIDCode); +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeDoorLockClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the lock-state attribute for server into buffer including the APS frame @@ -869,6 +893,12 @@ uint16_t encodeGroupsClusterRemoveGroupCommand(uint8_t * buffer, uint16_t buf_le uint16_t encodeGroupsClusterViewGroupCommand(uint8_t * buffer, uint16_t buf_length, CHIPEndpointId destination_endpoint, CHIPGroupId groupId); +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeGroupsClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the name-support attribute for server into buffer including the APS frame @@ -903,6 +933,12 @@ uint16_t encodeIdentifyClusterIdentifyCommand(uint8_t * buffer, uint16_t buf_len */ uint16_t encodeIdentifyClusterIdentifyQueryCommand(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeIdentifyClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the identify-time attribute for server into buffer including the APS frame @@ -994,6 +1030,12 @@ uint16_t encodeLevelClusterStopCommand(uint8_t * buffer, uint16_t buf_length, ui uint16_t encodeLevelClusterStopWithOnOffCommand(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint, uint8_t optionsMask, uint8_t optionsOverride); +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeLevelClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the current-level attribute for server into buffer including the APS frame @@ -1033,6 +1075,12 @@ uint16_t encodeOnOffClusterOnCommand(uint8_t * buffer, uint16_t buf_length, uint */ uint16_t encodeOnOffClusterToggleCommand(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeOnOffClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the on-off attribute for server into buffer including the APS frame @@ -1118,6 +1166,12 @@ uint16_t encodeScenesClusterStoreSceneCommand(uint8_t * buffer, uint16_t buf_len uint16_t encodeScenesClusterViewSceneCommand(uint8_t * buffer, uint16_t buf_length, CHIPEndpointId destination_endpoint, CHIPGroupId groupID, uint8_t sceneID); +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeScenesClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the scene-count attribute for server into buffer including the APS frame @@ -1162,6 +1216,12 @@ uint16_t encodeScenesClusterReadNameSupportAttribute(uint8_t * buffer, uint16_t | * MaxMeasuredValue | 0x0002 | \*----------------------------------------------------------------------------*/ +/** + * @brief + * Encode a discover command for server into buffer including the APS frame + */ +uint16_t encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint); + /** * @brief * Encode a read command for the measured-value attribute for server into buffer including the APS frame diff --git a/src/app/encoder.cpp b/src/app/encoder.cpp index 1bb01561650afc..fe6a29c6c348d6 100644 --- a/src/app/encoder.cpp +++ b/src/app/encoder.cpp @@ -71,6 +71,23 @@ using namespace chip; } \ return result; +#define DISCOVER_ATTRIBUTES(name, cluster_id) \ + BufBound buf = BufBound(buffer, buf_length); \ + if (_encodeGlobalCommand(buf, destination_endpoint, cluster_id, 0x0c)) \ + { \ + /* Discover all attributes */ \ + buf.PutLE16(0x0000); \ + buf.Put(0xFF); \ + } \ + \ + uint16_t result = buf.Fit() && CanCastTo(buf.Written()) ? static_cast(buf.Written()) : 0; \ + if (result == 0) \ + { \ + ChipLogError(Zcl, "Error encoding %s command", name); \ + return 0; \ + } \ + return result; + #define COMMAND_HEADER(name, cluster_id, command_id) \ BufBound buf = BufBound(buffer, buf_length); \ uint16_t result = _encodeClusterSpecificCommand(buf, destination_endpoint, cluster_id, command_id); \ @@ -272,6 +289,11 @@ uint16_t encodeBarrierControlClusterStopCommand(uint8_t * buffer, uint16_t buf_l COMMAND_FOOTER(kName); } +uint16_t encodeBarrierControlClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverBarrierControlAttributes", BARRIER_CONTROL_CLUSTER_ID); +} + /* * Attribute MovingState */ @@ -333,6 +355,11 @@ uint16_t encodeBasicClusterResetToFactoryDefaultsCommand(uint8_t * buffer, uint1 COMMAND_FOOTER(kName); } +uint16_t encodeBasicClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverBasicAttributes", BASIC_CLUSTER_ID); +} + /* * Attribute ZCLVersion */ @@ -649,6 +676,11 @@ uint16_t encodeColorControlClusterStopMoveStepCommand(uint8_t * buffer, uint16_t COMMAND_FOOTER(kName); } +uint16_t encodeColorControlClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverColorControlAttributes", COLOR_CONTROL_CLUSTER_ID); +} + /* * Attribute CurrentHue */ @@ -1381,6 +1413,11 @@ uint16_t encodeDoorLockClusterUnlockWithTimeoutCommand(uint8_t * buffer, uint16_ COMMAND_FOOTER(kName); } +uint16_t encodeDoorLockClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverDoorLockAttributes", DOOR_LOCK_CLUSTER_ID); +} + /* * Attribute LockState */ @@ -1503,6 +1540,11 @@ uint16_t encodeGroupsClusterViewGroupCommand(uint8_t * buffer, uint16_t buf_leng COMMAND_FOOTER(kName); } +uint16_t encodeGroupsClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverGroupsAttributes", GROUPS_CLUSTER_ID); +} + /* * Attribute NameSupport */ @@ -1549,6 +1591,11 @@ uint16_t encodeIdentifyClusterIdentifyQueryCommand(uint8_t * buffer, uint16_t bu COMMAND_FOOTER(kName); } +uint16_t encodeIdentifyClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverIdentifyAttributes", IDENTIFY_CLUSTER_ID); +} + /* * Attribute IdentifyTime */ @@ -1706,6 +1753,11 @@ uint16_t encodeLevelClusterStopWithOnOffCommand(uint8_t * buffer, uint16_t buf_l COMMAND_FOOTER(kName); } +uint16_t encodeLevelClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverLevelAttributes", LEVEL_CLUSTER_ID); +} + /* * Attribute CurrentLevel */ @@ -1760,6 +1812,11 @@ uint16_t encodeOnOffClusterToggleCommand(uint8_t * buffer, uint16_t buf_length, COMMAND_FOOTER(kName); } +uint16_t encodeOnOffClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverOnOffAttributes", ON_OFF_CLUSTER_ID); +} + /* * Attribute OnOff */ @@ -1893,6 +1950,11 @@ uint16_t encodeScenesClusterViewSceneCommand(uint8_t * buffer, uint16_t buf_leng COMMAND_FOOTER(kName); } +uint16_t encodeScenesClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverScenesAttributes", SCENES_CLUSTER_ID); +} + /* * Attribute SceneCount */ @@ -1952,6 +2014,11 @@ uint16_t encodeScenesClusterReadNameSupportAttribute(uint8_t * buffer, uint16_t | * MaxMeasuredValue | 0x0002 | \*----------------------------------------------------------------------------*/ +uint16_t encodeTemperatureMeasurementClusterDiscoverAttributes(uint8_t * buffer, uint16_t buf_length, uint8_t destination_endpoint) +{ + DISCOVER_ATTRIBUTES("DiscoverTemperatureMeasurementAttributes", TEMPERATURE_MEASUREMENT_CLUSTER_ID); +} + /* * Attribute MeasuredValue */